Hi Thomas, could you bear with me on this?
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
Of course not. I am taking that last sentence literally when you say "su" and not "su -". If you just "su", then yes, you will get to be user "root", but all that has done is to change your effective $UID and $GID. NO environment variables are modified with a plain "su".
Ok, so no environment variables are modified. $PATH is an environmental variable. richard@linux:~ > echo $PATH /usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/lib/java/bin:/var/lib /dosemu:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde2/bin:/opt/kd e/bin:/usr/openwin/bin:.:/opt/gnome/bin:/opt/pilotsdk/bin richard@linux:~ > su Password: root@linux:/home/richard > echo $PATH /usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin So a plain su HAS modified an environmental variable. PATH wasn't constructed after su within /etc/profile because /etc/profile wasn't run. So the question remains, where does the new path come from? I'm likely being thick here. regards Richard -- richard@tortoise.demon.co.uk