Hi Chris, I'd read the info on su at for example: http://www.icewalkers.com/Linux/Howto/mini/Path-7.html and other places. Obviously I've not understood it.
On Wednesday 23 July 2003 00:24, richard@tortoise.demon.co.uk wrote:
I was unaware that if you su to root, you get a path (compiled into the kernel?)
No, it's set in /etc/profile.
that it seems you cant edit.
There's something wrong if you can't edit it.
If I log on as root, then echo $PATH shows lots of directorys. /root/.profile has nothing in it to modify roots path, so I assume the path is defined fully in /etc/profile If I log in as user1 and su to root (not su - ) then echo $PATH gives only: /usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin which is neither the path for user1 nor that had I logged in directly as root. So where does this path come from? I don't think /etc/profile is executed if I su to root. If I put something like echo "here we are in /etc/profile" at the start of it, I never see the echo when I su regards Richard-- richard@tortoise.demon.co.uk