Randy McMurchy wrote:
>
> DJ, please provide examples of what you want to do to fix the PATH
> issue. I have an /etc/profile set up which installs a base PATH.
> Each user has a .bashrc which sources /etc/profile. Root's .bashrc
> also sets up /sbin and /usr/sbin. And, though I'm not sure it comes
> into play, each user has a .profile which does nothing more than
> source .bashrc.
>
> Works for me. PATH is always set correctly no matter how I log in
> or whether I use su or su -.
>
Randy, with your setup you'll never see an issue. If your users are
setup correctly with a ~/.bashrc then nothing should be needed.
However, /etc/pam.d/login contains the line 'auth required pam_env.so'.
This should be changed to 'session required pam_env.so' and the same
should be added to /etc/pam.d/su. Also, the default path should be
provided as was provided in /etc/login.defs. This was
'ENV_PATH PATH=/bin:/usr/bin' The same should now be added to
/etc/security/pam_env.conf like so:
"echo 'PATH DEFAULT=/bin:/usr/bin OVERRIDE=${PATH}' >>
/etc/security/pam_env.conf"
Watch the line wrap (I'm sure that was self explanatory) and the single
quotes so that ${PATH} is not expanded in the pam_env.conf file. Before
doing any of the above, to reproduce the error, create a new user (or
give one of your service accounts a shell in /etc/passwd) and su to that
user and check your path.
Just a thought, but if you have the copy of login.defs, that could be
used to extract the original default path as it might have already been
modified by the user.
-- DJ Lucas
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page