Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path variable not sticking while I su around 1

Status
Not open for further replies.

skiflyer

Programmer
Joined
Sep 24, 2002
Messages
2,213
Location
US
Perhaps this is intended behavior, but if so I'd like to break it.

I've set the PATH variable in both
/etc/profile
and
/root/.profile

And when I ssh to my machine and login as any user, including root, and echo $PATH, everything looks great.

However, as soon as I start su'ing to different users the path changes to
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

Is there a way to set my path such that it sticks when I switch users?
 
That's what I was looking for... thanks so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top