You are not logged in.

#1 2009-01-09 12:11:54

F1y3r
Member
Registered: 2007-09-28
Posts: 61

[SOLVED] /sbin isn't in $PATH of root

$PATH of root is /usr/bin:/bin
There's no .bash_profile of root and I haven't changed anything in .bashrc (there's only bash promt).
How can it be fixed?

Last edited by F1y3r (2009-01-09 13:16:33)

Offline

#2 2009-01-09 12:19:27

skualito
Member
Registered: 2008-11-19
Posts: 203

Re: [SOLVED] /sbin isn't in $PATH of root

in the file /etc/profile you should have something like this

# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH

Offline

#3 2009-01-09 12:26:25

F1y3r
Member
Registered: 2007-09-28
Posts: 61

Re: [SOLVED] /sbin isn't in $PATH of root

My /etc/profile already has:
# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH

Here's full /etc/profile http://pastebin.com/m5295e6ef

Offline

#4 2009-01-09 12:48:03

skualito
Member
Registered: 2008-11-19
Posts: 203

Re: [SOLVED] /sbin isn't in $PATH of root

when logged as root from you login manager (if you use one) is 'echo $PATH' giving the same result ?
How did you notice this with the root path ? error message ?

Offline

#5 2009-01-09 13:16:09

F1y3r
Member
Registered: 2007-09-28
Posts: 61

Re: [SOLVED] /sbin isn't in $PATH of root

Thanks skualito. I have used the following way to autologin and it makes root use the wrong path:
x:5 :once:/bin/su username -l -c "/bin/bash –login -c startx >/dev/null 2>/dev/null"

Offline

Board footer

Powered by FluxBB