gksu only works in su authentication mode [solved – sort of]

Forum Forums Official Releases antiX-21/22 “Grup Yorum” gksu only works in su authentication mode [solved – sort of]

Tagged: 

  • This topic has 14 replies, 4 voices, and was last updated May 3-6:15 pm by mico.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #81388
    Member
    mico

      Hello.

      Since last month I have noticed that gksu doesn’t prompt a window asking my user password, until now I have had some time to fix this problem due to vacations.
      If I run gksu-properties and change the authentication mode from sudo to su, it indeed works! But in sudo, it only clog processes in the task manager when I try to open a program, either through menu, taskbar (unplugdrive.sh), control center and even terminal.

      It is only resigned to work if previously I ran sudo in terminal to apt update, but doing that it’s very unpractical, breaking my workflow and I can’t also compromise my system to run sudo every program that need it, because it’s not safe as running gksu.

      I’ve tried uninstall and reinstall gksu and libgksu2-0, it’s still don’t working. I have run gksu with -d and -g options together, it’s show only this, for example trying running synaptic:

      $ gksu -dg synaptic
      No ask_pass set, using default!
      xauth: /tmp/libgksu-2RCybo/.Xauthority
      STARTUP_ID: gksu/synaptic/8890-0-user_TIME19536822
      cmd[0]: /usr/bin/sudo
      cmd[1]: -H
      cmd[2]: -S
      cmd[3]: -p
      cmd[4]: GNOME_SUDO_PASS
      cmd[5]: -u
      cmd[6]: root
      cmd[7]: --
      cmd[8]: synaptic
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      buffer: --
      brute force GNOME_SUDO_PASS ended...
      No password prompt found; we'll assume we don't need a password.

      Again, doing this does not pop up any window asking my user password nor the program is executed, nothing. Occurs on any desktop I choose, in fact, in all of them. And yes it only reach this point, no more xauth messages after “(…) we’ll assume we don’t need a password.”.

      My antiX It’s a full install on encrypted partitions, so I can’t do chroot rescue scan booting a live-usb because no “Linux systems were found” and doing a backup it’s more difficult, If not impossible.
      Please help solve this problem, I have researched on the web and can’t find anything that solves this without success, even trying to modify every program shortcut. I don’t even have all that time to reinstall antiX like this guy with similar problem: https://www.antixforum.com/forums/topic/cannot-use-gksu-anymore/

      Thanks.

      • This topic was modified 1 year ago by mico.
      • This topic was modified 1 year ago by mico.
      • This topic was modified 1 year ago by anticapitalista.
      #81394
      Member
      mico
        Helpful
        Up
        0
        ::

        Readouts:

        $ inxi -Fxz
        System:
          Kernel: 5.10.104-antix.1-amd64-smp x86_64 bits: 64 compiler: gcc 
          v: 10.2.1 Desktop: JWM 2.4.0 
          Distro: antiX-21_x64-full Grup Yorum 31 October 2021 
          base: Debian GNU/Linux 11 (bullseye) 
        Machine:
          Type: Laptop System: Hewlett-Packard product: HP 630 Notebook PC 
          v: 0584100000204C10002630100 serial: <filter> 
          Mobo: Hewlett-Packard model: 3674 v: 28.4B serial: <filter> 
          BIOS: Hewlett-Packard v: F.39 date: 12/18/2011 
        CPU:
          Info: Dual Core model: Intel Core i3 M 370 bits: 64 type: MT MCP 
          arch: Nehalem rev: 5 cache: L2: 3 MiB 
          flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19150 
          Speed: 1552 MHz min/max: 933/2399 MHz Core speeds (MHz): 1: 1552 2: 1368 
          3: 1203 4: 2143 
        Graphics:
          Device-1: Intel Core Processor Integrated Graphics 
          vendor: Hewlett-Packard driver: i915 v: kernel bus-ID: 00:02.0 
          Device-2: Alcor Micro HP Webcam-101 type: USB driver: uvcvideo 
          bus-ID: 1-1.3:4 
          Display: x11 server: X.Org 1.20.11 driver: loaded: intel 
          resolution: 1366x768~60Hz 
          OpenGL: renderer: Mesa DRI Intel HD Graphics (ILK) v: 2.1 Mesa 20.3.5 
          direct render: Yes 
        Audio:
          Device-1: Intel 5 Series/3400 Series High Definition Audio 
          vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 
          Sound Server-1: ALSA v: k5.10.104-antix.1-amd64-smp running: yes 
        Network:
          Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
          vendor: Hewlett-Packard driver: r8169 v: kernel port: 3000 
          bus-ID: 01:00.0 
          IF: eth0 state: down mac: <filter> 
          Device-2: Qualcomm Atheros AR9285 Wireless Network Adapter 
          vendor: Hewlett-Packard driver: ath9k v: kernel port: 3000 
          bus-ID: 02:00.0 
          IF: wlan0 state: up mac: <filter> 
        Bluetooth:
          Device-1: Qualcomm Atheros AR3011 Bluetooth type: USB driver: btusb 
          v: 0.8 bus-ID: 1-1.4:6 
          Report: hciconfig ID: hci0 rfk-id: 3 state: down bt-service: running 
          rfk-block: hardware: no software: yes address: <filter> 
        Drives:
          Local Storage: total: 473.22 GiB used: 17.14 GiB (3.6%) 
          ID-1: /dev/sda vendor: Seagate model: ST9500325AS size: 465.76 GiB 
          ID-2: /dev/sdb type: USB vendor: Kingston model: DataTraveler 108 
          size: 7.46 GiB 
        Partition:
          ID-1: / size: 451.45 GiB used: 17 GiB (3.8%) fs: ext4 dev: /dev/dm-0 
          mapped: root.fsm 
          ID-2: /boot size: 487.2 MiB used: 141.2 MiB (29.0%) fs: ext4 
          dev: /dev/sda1 
        Swap:
          ID-1: swap-1 type: partition size: 5.48 GiB used: 0 KiB (0.0%) 
          dev: /dev/dm-1 mapped: swap 
        Sensors:
          System Temperatures: cpu: 50.0 C mobo: 48.0 C 
          Fan Speeds (RPM): N/A 
        Info:
          Processes: 197 Uptime: 6h 56m Memory: 3.64 GiB used: 1.33 GiB (36.6%) 
          Init: SysVinit runlevel: 5 Compilers: gcc: 10.2.1 Packages: 1633 
          Shell: Bash v: 5.1.4 inxi: 3.3.06
        #81395
        Member
        mico
          Helpful
          Up
          0
          ::

          What is registered in history.log from /var/log/apt:

          Start-Date: 2022-04-06  22:23:14
          Commandline: apt-get dist-upgrade
          Requested-By: Damar (1000)
          Upgrade: firefox-esr:amd64 (91.7.0esr-1~deb11u1, 91.8.0esr-1~deb11u1)
          End-Date: 2022-04-06  22:23:32
          
          Start-Date: 2022-04-07  11:23:38
          Commandline: apt-get dist-upgrade
          Requested-By: Damar (1000)
          Upgrade: feh:amd64 (3.7.1-1.0antix1, 3.8-1.0antix1), advert-block-antix:amd64 (0.2.30, 0.2.31), palemoon:amd64 (29.4.4-1.gtk3.mx21, 29.4.5.1-1.gtk3.mx21)
          End-Date: 2022-04-07  11:23:57
          
          Start-Date: 2022-04-11  23:03:24
          Commandline: /usr/sbin/synaptic
          Requested-By: Damar (1000)
          Reinstall: gksu:amd64 (2.1.0), libgksu2-0:amd64 (2.1.0)
          End-Date: 2022-04-11  23:03:38
          
          Start-Date: 2022-04-12  12:58:34
          Commandline: /usr/sbin/synaptic
          Requested-By: Damar (1000)
          Reinstall: gksu:amd64 (2.1.0), libgksu2-0:amd64 (2.1.0)
          End-Date: 2022-04-12  12:58:43
          
          Start-Date: 2022-04-12  13:32:18
          Commandline: /usr/sbin/synaptic
          Requested-By: Damar (1000)
          Install: big-cursor:amd64 (3.12)
          End-Date: 2022-04-12  13:32:28
          
          Start-Date: 2022-04-12  13:52:09
          Commandline: /usr/sbin/synaptic
          Requested-By: Damar (1000)
          Install: crystalcursors:amd64 (1.1.1-14.1)
          End-Date: 2022-04-12  13:52:14
          
          Start-Date: 2022-04-12  18:30:20
          Commandline: apt install --reinstall desktop-session-antix
          Requested-By: Damar (1000)
          Reinstall: desktop-session-antix:amd64 (2.0.12)
          End-Date: 2022-04-12  18:30:30
          
          Start-Date: 2022-04-12  21:28:12
          Commandline: /usr/sbin/synaptic
          Requested-By: Damar (1000)
          Remove: desktop-defaults-antix:amd64 (0.1.10), desktop-session-antix:amd64 (2.0.12), gexec:amd64 (0.5.4.2~ski)
          Purge: gksu:amd64 (2.1.0), libgksu2-0:amd64 (2.1.0)
          End-Date: 2022-04-12  21:28:23
          
          Start-Date: 2022-04-13  14:52:40
          Commandline: apt install -f gksu
          Requested-By: Damar (1000)
          Install: gksu:amd64 (2.1.0), libgksu2-0:amd64 (2.1.0, automatic)
          End-Date: 2022-04-13  14:52:53
          
          Start-Date: 2022-04-14  23:04:56
          Commandline: apt install gexec
          Requested-By: Damar (1000)
          Install: gexec:amd64 (0.5.4.2~ski)
          End-Date: 2022-04-14  23:05:03
          
          Start-Date: 2022-04-14  23:18:05
          Commandline: apt install --reinstall desktop-defaults-core-antix
          Requested-By: Damar (1000)
          Reinstall: desktop-defaults-core-antix:amd64 (0.6.12)
          End-Date: 2022-04-14  23:18:15
          
          Start-Date: 2022-04-15  00:37:18
          Commandline: apt install desktop-session-antix
          Requested-By: Damar (1000)
          Install: desktop-defaults-antix:amd64 (0.1.10, automatic), desktop-session-antix:amd64 (2.0.12)
          End-Date: 2022-04-15  00:37:25
          
          Start-Date: 2022-04-15  02:10:10
          Commandline: apt install libatk-adaptor
          Requested-By: Damar (1000)
          Install: libatk-adaptor:amd64 (2.38.0-1)
          End-Date: 2022-04-15  02:10:15
          
          Start-Date: 2022-04-15  02:12:42
          Commandline: apt install libgail-common
          Requested-By: Damar (1000)
          Install: libgail18:amd64 (2.24.33-2, automatic), libgail-common:amd64 (2.24.33-2)
          End-Date: 2022-04-15  02:12:45

          Sorry if there isn’t more logs from previous month, I repeat I had no time to solve this problem until now; I did not know that this could be done.

          • This reply was modified 1 year ago by mico.
          #81398
          Member
          mico
            Helpful
            Up
            0
            ::

            What is in sudoers file:

            #
            # This file MUST be edited with the 'visudo' command as root.
            #
            # Please consider adding local content in /etc/sudoers.d/ instead of
            # directly modifying this file.
            #
            # See the man page for details on how to write a sudoers file.
            #
            Defaults        timestamp_timeout=30
            Defaults        env_reset
            Defaults        mail_badpass
            Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            
            # Host alias specification
            
            # User alias specification
            
            # Cmnd alias specification
            
            # User privilege specification
            root    ALL=(ALL:ALL) ALL
            
            # Allow members of group sudo to execute any command
            %sudo   ALL=(ALL:ALL) ALL
            
            # See sudoers(5) for more information on "@include" directives:
            
            @includedir /etc/sudoers.d

            P.D. Changing Defaults timestamp_timeout=0 does not solve anything.

            • This reply was modified 1 year ago by mico.
            • This reply was modified 1 year ago by mico.
            #81477
            Member
            ModdIt
              Helpful
              Up
              0
              ::

              Pls take a look at:

              ~/.gconf/apps/gksu/%gconf.xml
              contains on my working systems 
              <?xml version="1.0"?>
              <gconf>
              	<entry name="display-no-pass-info" mtime="1428005245" type="bool" value="false"/>
              	<entry name="save-to-keyring" mtime="1428005175" type="bool" value="true"/>
              	<entry name="sudo-mode" mtime="1428005183" type="bool" value="true"/>
              </gconf> 
              #81488
              Member
              Robin
                Helpful
                Up
                0
                ::

                Does the password request come back after entering
                sudo -k
                in a virtual console window (e.g. RoxTerm)?

                What does
                sudo -l
                give back?

                Windows is like a submarine. Open a window and serious problems will start.

                #81493
                Member
                iznit
                  Helpful
                  Up
                  0
                  ::

                  malformed line in sudoers file

                  What is in sudoers file:
                  Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi>

                  sudo visudo
                  to edit the sudoers file

                  Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"

                  also, check the manpage….. is “-g” a valid flag?

                  gksu -dg synaptic

                  • This reply was modified 1 year ago by iznit.
                  #81535
                  Member
                  mico
                    Helpful
                    Up
                    0
                    ::

                    Pls take a look at:

                    ~/.gconf/apps/gksu/%gconf.xml
                    contains on my working systems 
                    <?xml version="1.0"?>
                    <gconf>
                    	<entry name="display-no-pass-info" mtime="1428005245" type="bool" value="false"/>
                    	<entry name="save-to-keyring" mtime="1428005175" type="bool" value="true"/>
                    	<entry name="sudo-mode" mtime="1428005183" type="bool" value="true"/>
                    </gconf> 

                    Yes. This is what look gconf.xml file to me:

                    <?xml version="1.0"?>
                    <gconf>
                    	<entry name="force-grab" mtime="1649810768" type="bool" value="true"/>
                    	<entry name="disable-grab" mtime="1649810768" type="bool" value="false"/>
                    	<entry name="prompt" mtime="1649810768" type="bool" value="false"/>
                    	<entry name="save-keyring" mtime="1649791072" type="string">
                    		<stringvalue>session</stringvalue>
                    	</entry>
                    	<entry name="display-no-pass-info" mtime="1428005245" type="bool" value="false"/>
                    	<entry name="save-to-keyring" mtime="1649791074" type="bool" value="false"/>
                    	<entry name="sudo-mode" mtime="1649801811" type="bool" value="true"/>
                    </gconf>

                    So I have to do a little tweak like what is in my file as in the code you shared, am I right?

                    #81536
                    Member
                    mico
                      Helpful
                      Up
                      0
                      ::

                      Does the password request come back after entering
                      sudo -k
                      in a virtual console window (e.g. RoxTerm)?

                      What does
                      sudo -l
                      give back?

                      @Robin, I’ve entered sudo -k on RoxTerm and urxvt and does nothing. But, for sudo -l it gives this:

                      $ sudo -l
                      Matching Defaults entries for Damar on damar:
                          timestamp_timeout=0, env_reset, mail_badpass,
                          secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin,
                          !requiretty, !tty_tickets
                      
                      Runas and Command-specific defaults for Damar:
                          Defaults!/usr/local/bin/menu_manager.sh env_keep+=HOME
                      
                      User Damar may run the following commands on damar:
                          (ALL : ALL) ALL
                          (root) NOPASSWD: /sbin/halt
                          (root) NOPASSWD: /sbin/poweroff
                          (root) NOPASSWD: /sbin/reboot
                          (root) NOPASSWD: /sbin/blkid
                          (root) NOPASSWD: /sbin/fdisk.distrib
                          (root) NOPASSWD: /usr/bin/ceni
                          (root) NOPASSWD: /usr/local/bin/persist-config
                          (root) NOPASSWD: /usr/local/bin/persist-save
                          (root) NOPASSWD: /usr/sbin/minstall
                          (root) NOPASSWD: /usr/local/bin/connectshares.sh
                          (root) NOPASSWD: /usr/local/bin/disconnectshares.sh
                          (root) NOPASSWD: /bin/chvt
                          (root) NOPASSWD: /usr/local/bin/menu_manager.sh
                          (root) NOPASSWD: /usr/sbin/pm-hibernate
                          (root) NOPASSWD: /usr/sbin/pm-suspend

                      Yes, since I posted in #81398, I have modified myself timestamp_timeout from ’30’ to ‘0’. not that it is a deliberate change by the operating system itself.

                      • This reply was modified 1 year ago by mico.
                      • This reply was modified 1 year ago by mico.
                      • This reply was modified 1 year ago by mico.
                      #81537
                      Member
                      mico
                        Helpful
                        Up
                        0
                        ::

                        malformed line in sudoers file

                        What is in sudoers file:
                        Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi>

                        sudo visudo
                        to edit the sudoers file

                        Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"

                        also, check the manpage….. is “-g” a valid flag?

                        gksu -dg synaptic

                        @iznit. Actually that line in sudoers file look like this:

                        Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

                        Sorry I made a mistake when copying and pasting the code. And yes, I have already checked the manpage and -g is a valid option, according to the manpage:

                        --disable-grab, -g
                        
                                      Disable  the "locking" of the keyboard, mouse, and focus done by the program when
                                      asking for password.

                        Maybe I got carried away by how another user who had the same problem as mine tried to enter this command, and it seemed to work for him, but not for me.

                        • This reply was modified 1 year ago by mico.
                        #81545
                        Member
                        mico
                          Helpful
                          Up
                          0
                          ::

                          Update.

                          I edited my %gconf.xml file as @moddit suggested:

                          Pls take a look at:

                          ~/.gconf/apps/gksu/%gconf.xml
                          contains on my working systems 
                          <?xml version="1.0"?>
                          <gconf>
                          	<entry name="display-no-pass-info" mtime="1428005245" type="bool" value="false"/>
                          	<entry name="save-to-keyring" mtime="1428005175" type="bool" value="true"/>
                          	<entry name="sudo-mode" mtime="1428005183" type="bool" value="true"/>
                          </gconf> 

                          It still does not work.
                          If you are wondering if I tried to change the password in the antiX user manager, I did and it still gksu doesn’t work as before.

                          • This reply was modified 1 year ago by mico.
                          • This reply was modified 1 year ago by mico.
                          • This reply was modified 1 year ago by mico.
                          #81576
                          Member
                          mico
                            Helpful
                            Up
                            0
                            ::

                            Here are more details that could be useful to find a solution to this problem.

                            So I’ve run strace -o for gksu synaptic in the full installation, and name it negative.txt; same thing I did in the case of how it’s supposed to work, taking as an example the performance of a new live-usb, the name I gave it here is positive.txt. Both text files are attached here, in order to find differences, same goes for xsession-errors file, where I realized that I had it stored in my home folder after taking a good look at the output of $ls -la, which I also include as a image attachment.

                            #82551
                            Member
                            mico
                              Helpful
                              Up
                              0
                              ::

                              Somehow I managed to accidentally fixing using zzzfm, then going to etc/pam.d and edit one file in this library, I don’t remember how do to do it again, but it get reverted, and again I can’t make use of gksu with su authentication mode…
                              So is there an permanent solution for this issue, please? It is something about PAM modules.

                              • This reply was modified 1 year ago by mico.
                              • This reply was modified 1 year ago by mico.
                              #82559
                              Member
                              ModdIt
                                Helpful
                                Up
                                1
                                ::

                                Hi mico,
                                as you say you had fixed the problem with an edit in etc/pam.d
                                why not take contents from your working live usb and compare directly
                                suspect files with the ones on the setup giving you issues.

                                You will have to work with sudo but in any case ownership of the files
                                is root:root. Quick and dirty would be replace file by file until your
                                setup works same as the live stick.

                                #82598
                                Member
                                mico
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Hi mico,
                                  as you say you had fixed the problem with an edit in etc/pam.d
                                  why not take contents from your working live usb and compare directly
                                  suspect files with the ones on the setup giving you issues.

                                  You will have to work with sudo but in any case ownership of the files
                                  is root:root. Quick and dirty would be replace file by file until your
                                  setup works same as the live stick.

                                  Yes this is how worked the first time I fixed it (and again now), but I can’t point out what specific file is. Maybe one of those that start with ‘Common-‘.
                                  This is very weird behaviour because when I close the tab on zzzfm in /etc/pam.d, the problem persist. And when I edit as administrator those files used by PAM, I don’t really modify anything, I just open it, I read it and that’s all what I do. This may be a bug. It’s seem I am the first that takes the time to work around to fix it without reinstall antiX, so yeah.

                                  Can some moderator put as solved this topic, please? I think it has been solved, but with adhesive tape, it would still be necessary to analyze further why this is happening without it getting damaged again later on. It is certainly more complex, but I do not know how to really solve it for everyone.

                                  Thanks.

                                  • This reply was modified 1 year ago by mico.
                                  • This reply was modified 1 year ago by mico.
                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • You must be logged in to reply to this topic.