Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#49885 - [util-linux] /etc/environment not sourced by `su -` (with hyphen)

Attached to Project: Arch Linux
Opened by ilya (leniviy) - Wednesday, 29 June 2016, 11:29 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 20 August 2018, 19:46 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned
Assigned To Dave Reisner (falconindy)
Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

Description:

/etc/environment is sourced, when you login using text console, desktop manager or ssh, but not sourced by the command `su -` (with hyphen).
This is because pam_env module not mentioned in /etc/pam.d/su-l

I expect that issuing `su -` will have the same effect as logging in using other methods.

Please append extra line to the default config file /etc/pam.d/su-l :

session required pam_env.so

Additional info:
* package version(s)
util-linux 2.28-1

Steps to reproduce:

- put the following in /etc/environment :

AAABBB=cccddd

- login using text console
- ensure the variable is set:

$ echo $AAABBB
cccddd

- login using su - :

$ su -
Password:
#

- ensure the variable is not set:

# echo $AAABBB

#
This task depends upon

Comment by Doug Newgard (Scimmia) - Thursday, 30 June 2016, 04:22 GMT
Is this covered by  FS#40633 ?
Comment by ilya (leniviy) - Thursday, 30 June 2016, 05:25 GMT
Maybe. I think the files /etc/pam.d/su and /etc/pam.d/su-l should have different contents. `su` without hyphen should preserve the current environment and probably should not call pam_env.
Comment by Greg (skimj) - Wednesday, 07 December 2016, 22:17 GMT
Likewise, the /etc/security/pam_env.conf is only sourced with the line
`session required pam_env.so` and I expected that to happen for `su -l` (but not necessarily just `su`).

Loading...