[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: /etc/init.d in the default $PATH ?
- From: Chris Adams <cmadams hiwaay net>
- To: Development discussions related to Fedora Core <fedora-devel-list redhat com>
- Subject: Re: /etc/init.d in the default $PATH ?
- Date: Sat, 27 Jan 2007 21:16:44 -0600
Once upon a time, Peter Gordon <peter thecodergeek com> said:
> Both su and sudo only change your effective user ID to that of the root
> user (in essence giving you root permissions to files/directories/etc.),
> but your environment (PATH, HOME, TMPDIR, etc.) all remain untouched. If
> you want to gain a full login shell as the root user (including your own
> environment and running root's login scripts), you need to use 'su -'.
The annoying thing about that is that "su -" also changes your current
working directory. If you are in a directory and need to do something
to a file as root, you either "su" (and possible have to set your PATH
or explicitly call /usr/sbin/xyzzy) or you "su -" and hunt down the
directory again.
Personally, I drop an extra script in /etc/profile.d that (among other
things) adds /usr/local/sbin:/usr/sbin:/sbin to the PATH of all users.
It doesn't really hurt anything.
--
Chris Adams <cmadams hiwaay net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]