Bug#907145: gksu: Fails to change PATH according to /ect/sudoers
Chris Tillman
toff.tillman at gmail.com
Fri Aug 24 11:21:37 BST 2018
Package: gksu
Version: 2.0.2-9+b1
Severity: normal
Dear Maintainer,
* What led up to the situation?
I was upgrading the testing distribution after several months using aptitude. I
upgraded about half the packages, but when I went to upgrade the other half I
received errors from dpkg:
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
* What exactly did you do (or not do) that was effective (or
ineffective)?
I searched online and found the cause of the errors was, as the error states,
the PATH being incorrect. I checked the PATH resulting when I chose "Root
Terminal" from the menu, and this path did not include the sbin directories.
root at ctillman:/home/chris# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
I tried sudo from a regular user terminal window to check the path which would
come up with it:
chris at ctillman:~$ sudo bash -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
And then, because gksu starts Root Terminal, I tried the equivalent with gksu:
chris at ctillman:~$ gksu "bash -c 'echo $PATH'"
gksu-run: gksu/bash -c 'echo
|usr|local|bin:|usr|bin:|bin:|usr|local|games:|usr|games'/5044-0-ctillman_TIME11346051
gksu-run: 1f53968cb8fe3d752131e6a334975c84
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
This showed gksu is not changing the path when calling xfce4-terminal.
My /etc/sudoers contents:
root at ctillman:~# cat /etc/sudoers
#
# 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 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
chris 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
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.17.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_NZ.utf8, LC_CTYPE=en_NZ.utf8 (charmap=UTF-8), LANGUAGE=en_NZ:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gksu depends on:
ii gconf-service 3.2.6-4.1
ii libatk1.0-0 2.28.1-1
ii libc6 2.27-5
ii libcairo2 1.15.10-3
ii libfontconfig1 2.13.0-5
ii libfreetype6 2.8.1-2
ii libgconf-2-4 3.2.6-4.1
ii libgdk-pixbuf2.0-0 2.36.12-2
ii libgksu2-0 2.0.13~pre1-9+b2
ii libglib2.0-0 2.56.1-2
ii libgnome-keyring0 3.12.0-1+b2
ii libgtk2.0-0 2.24.32-2
ii libpango-1.0-0 1.42.4-1
ii libpangocairo-1.0-0 1.42.4-1
ii libpangoft2-1.0-0 1.42.4-1
ii libstartup-notification0 0.12-5
ii sudo 1.8.23-2
Versions of packages gksu recommends:
ii gnome-keyring 3.28.2-1
gksu suggests no packages.
-- no debconf information
More information about the pkg-gnome-maintainers
mailing list