-   Linux - Newbie (
-   -   $PATH problem (

charlie123 01-15-2003 04:29 PM

$PATH problem
ok, i did the redhat update thing and for some reason /sbin was removed from my $PATH. so i followed the instructions that can be found anywhere and edited /etc/profile and /root/.bash_profile by adding

export PATH=$PATH:/sbin at the end, but it still wont work. if i type that in manually at the command prompt then all is fine, except that it forgets it in the next session. i dont understand what im doing wrong but i cant get the damn thing to stick :(.

any help would be greatly appreciated.

CHarlie :)

tunedLow 01-15-2003 04:46 PM

Do you mean that /sbin was removed from your root path? Because I don't believe you should have it in a users path. If you're having trouble making it stick, manually manipulate the .bash_profile and fix it there.

charlie123 01-15-2003 04:47 PM

from what i can tell, if i login as root, then use su to change user, roots $PATH follows me. if i login as a user, then su and become root, users $PATH follows me. i dont know if this is suppose to happen, but i swear it never use to (before i updated my system).
however the problem still stands that i cant successfully change the average users $PATH, ive read everywhere that /etc/profile is where i change everyone but roots $PATH, yet when i do this, then login as a user, /sbin doesnt appear on my echo $PATH.
does anyone else but root need access to /sbin, cos if not then it dont matter too much.

cheers :)


charlie123 01-15-2003 04:50 PM

oh, it would appear that there isnt actually a problem then, if it is suppose to be this way. silly me, i remembered running lilo from a user other than root, and i wondered why it didnt work this time, so i assumed it was because /sbin had been removed from my PATH.

never mind, cheers anyway.

All times are GMT -5. The time now is 06:45 AM.