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

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

 



On Sat, 2007-01-27 at 16:27 -0800, Ron Johnson wrote:
> I don't modify the path on my system from the install default, but
> when logged in as root via 'su', /sbin is not in the path.  I do see
> something in /etc/profile that is apparently supposed to put it in
> there if the EUID is zero, but it never seems to happen.  I hadn't
> really thought about it much till now.  Is that a bug?  Does this
> happen to anyone else?
> 
> It also happens when using sudo, i.e. "sudo service" gets "sudo:
> service: command not found", whereas "sudo /sbin/service" shows usage
> for service.

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 -'.
-- 
Peter Gordon (codergeek42) / FSF Associate Member #5015
GnuPG Public Key ID: 0xFFC19479 / Fingerprint:
  DD68 A414 56BD 6368 D957 9666 4268 CB7A FFC1 9479
Blog: http://thecodergeek.com/blog/ 
About: http://fedoraproject.org/wiki/PeterGordon

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
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