Opened 19 years ago

Closed 19 years ago

Last modified 16 years ago

#1491 closed defect (fixed)

Shadow and PAM

Reported by: larry@… Owned by: bdubbs@…
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 LFS-User@…, 19 years ago

Milestone: future6.2
rep_platform: PCAll

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.

comment:2 by LFS-User@…, 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 DJ Lucas, 19 years ago

Milestone: 6.26.1
Version: a-SVNb-6.1-pre1

Changed target to 6.1. Changes commited for trunk in r4900 should be merged into 6.1.

comment:4 by DJ Lucas, 19 years ago

Add minor text change from 4901 to merge.

comment:5 by bdubbs@…, 19 years ago

Owner: changed from blfs-book@… to bdubbs@…

comment:6 by bdubbs@…, 19 years ago

Status: newassigned

comment:7 by bdubbs@…, 19 years ago

Resolution: fixed
Status: assignedclosed

Merged changes from shadow into 6.1-pre2.

comment:8 by (none), 16 years ago

Milestone: 6.1

Milestone 6.1 deleted

Note: See TracTickets for help on using tickets.