Re: /etc/init.d in the default $PATH ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Once upon a time, Peter Gordon <peter@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxx>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux