[NTLUG:Discuss] Re: SuSE 9 or 9.1 PATH environment changes after su -- the end result?
Bryan J. Smith
b.j.smith at ieee.org
Tue Sep 14 00:35:57 CDT 2004
Chris Cox wrote:
> This actually goes far back with SUSE. "su" gives you a safe path,
> whatever you define in /etc/login.defs for root. Not sure if "pure"
> is correct since you have control over it.
> So, I would say:
> Red Hat
> su = (not sure, but sounds like they're striving to be more up-to-date)
> su - = root path just like a login.
> SUSE
> su = path as defined from /etc/login.defs or else a default safe path.
> su - = root path just like a login (which in SUSE's case includes the
> default user PATH after /sbin:/usr/sbin:/usr/local/sbin).
> With the advent of profile.d on SUSE, other things may happen as well ...
The end result?
For the best security, su or sudo, I should still be using absolute
paths in my scripts regardless, just like I have always. ;-p
I tend to put path verification and error handling in even my most
simple of bash/tcsh scripts.
--
Bryan J. Smith b.j.smith at ieee.org
------------------------------------------------------------------
"Communities don't have rights. Only individuals in the community
have rights. ... That idea of community rights is firmly rooted
in the 'Communist Manifesto.'" -- Michael Badnarik
More information about the Discuss
mailing list