On 4 February 2010 15:13, Richard R. Cahilig <email@example.com> wrote:
> I have a problem with my fedora 12 box. There is no /sbin and /usr/sbin PATH
> after using sudo. This is the output if I run the command echo $PATH.
> I tried to add the /sbin and /usr/sbin PATH in .bash_profile but I still have
> the same problem.
> If I use the command su, and if I run the command echo $PATH, the /sbin and
> the /usr/sbin is there.
> I need to use sudo instead of su for security reasons and I don't want to type
> the whole /sbin PATH if I will run some command from this /sbin. I don't know
> what is the problem I'm having in my fedora 12 box, please advise. Looking
> forward to your help. Sorry for my English.
As far as I understand this, sudo still uses your (the regular user's)
$PATH. Try setting $PATH in .bash_profile, logout and login again. The
logout and login is important. Technically you can just source your
.bash_profile and start working, but if you logout and login then you
know for sure whether this works for your subsequent sessions.
Hopefully this was helpful. Good Luck
Open source is the future. It sets us free.
users mailing list
To unsubscribe or change subscription options: