[Bug 984390] Re: $PATH is taken from login.defs not /etc/environment
Brian Murray
brian at ubuntu.com
Tue Mar 26 19:26:33 UTC 2019
Hello James, or anyone else affected,
Accepted shadow into xenial-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/shadow/1:4.2-3.1ubuntu5.4 in a few
hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-xenial to verification-done-xenial. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-xenial. In either case, without details of
your testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: shadow (Ubuntu Xenial)
Status: New => Fix Committed
** Tags added: verification-needed-xenial
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to shadow in Ubuntu.
https://bugs.launchpad.net/bugs/984390
Title:
$PATH is taken from login.defs not /etc/environment
Status in shadow package in Ubuntu:
Fix Released
Status in shadow source package in Precise:
Won't Fix
Status in shadow source package in Xenial:
Fix Committed
Status in shadow source package in Bionic:
Fix Committed
Bug description:
$PATH isn't sourced from /etc/environment, instead the version in
/etc/login.defs is used. (The example below comes from a precise install.)
| james at panlong:~$ echo $PATH
| /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
| james at panlong:~$ sudo su - buildd
| buildd at panlong:~$ echo $PATH
| /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
| buildd at panlong:~$ cat /etc/environment
| PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
| buildd at panlong:~$ grep PATH /etc/login.defs
| # Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
| # *REQUIRED* The default PATH settings, for superuser and normal users.
| ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
| ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
| #CRACKLIB_DICTPATH
| buildd at panlong:~$ sudo sed -i -e "s#^ENV_PATH.*#ENV_PATH PATH=/wtf:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games#" /etc/login.defs
| buildd at panlong:~$ logout
| james at panlong:~$ sudo su - buildd
| buildd at panlong:~$ echo $PATH
| /wtf:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
| buildd at panlong:~$
REGRESSION POTENTIAL:
- medium: it changes (incorrect) existing behaviour so https://xkcd.com/1172/ may apply
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/984390/+subscriptions
More information about the foundations-bugs
mailing list