#1491 closed defect (fixed)
Shadow and PAM
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | BOOK | Version: | b-6.1-pre1 |
Severity: | trivial | Keywords: | |
Cc: |
Description
I have found one situation where it doesn't work as it did. su used to get its PATH from /etc/login.defs using ENV_PATH and ENV_SUPATH. These are no longer available and according to the mailing list, are pam's responsibility. So the path after su or su <user> is "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." (default path coded in Bash source). This does not affect "su -" as that sources /etc/profile. The PATH can be set by the pam_env.so module by editing /etc/security/pam_env.conf: PATH DEFAULT=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin \ OVERRIDE=${PATH} and adding pam_env.conf to the auth section of /etc/pam.d/su.
I have not found a way to drop in a default PATH for root when su is used. Under these conditions, "su -" is the only sure way to get a root path.
Change History (8)
comment:1 by , 19 years ago
Milestone: | future → 6.2 |
---|---|
rep_platform: | PC → All |
comment:2 by , 19 years ago
I should add I also have a /root/.profile which is as follows:
root@rmlscsi: ~ > cat .profile if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
I am easily confused to what sources what when it comes to interactive and non-interactive logins. I just know that with my /etc/profile containing the PATH I need for everyday users, and then a .profile for every user as shown above, and root's .bashrc file contains the /sbin and /usr/sbin in the PATH, that I never have seen any issues no matter how I login, or create a shell.
comment:3 by , 19 years ago
Milestone: | 6.2 → 6.1 |
---|---|
Version: | a-SVN → b-6.1-pre1 |
Changed target to 6.1. Changes commited for trunk in r4900 should be merged into 6.1.
comment:5 by , 19 years ago
Owner: | changed from | to
---|
comment:6 by , 19 years ago
Status: | new → assigned |
---|
comment:7 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Merged changes from shadow into 6.1-pre2.
I am not seeing this issue as the way I have my root set up is with a .bashrc which sources /etc/profile and then adds custom root path to this. Here are the lines I use in /root/.bashrc which make it where I don't see this issue:
root@rmlscsi: ~ > cat .bashrc . /etc/profile
PATH=$PATH:/sbin:/usr/sbin export PATH
[rest snipped]
Is this enough to put in the book as a solution to the problem?
Note: I never saw the problem because of the way the /root/.bashrc is set up on my system.