On Monday 25 March 2002 04:03, gilson redrick wrote:
On Sunday, 24 March 2002 16:53, Tom Nicholson wrote:
At boot up, I get a graphical login. I login name= tom and enter p/w. KDE2 starts. Do ctrl-alt-F2, login as tom in text screen. (same user name & p/w) Land in /home/tom directory. Do su - enter root p/w and land in /root. So what I was saying was I didn't want to land in /root, rather in /home/tom after doing su -.
If as Tom you were in /home/tom and as root you want to still be in /home/tom, then you can't do 'su -', you have to do a plain 'su'. As I said before, a 'su -' does a *double* change: changes the user *and* the directory.
Plus some more: su: changes your effective priviliges, period. This allows you to run/install/mess up/break things unlimited. It does not, however, change environment variables. Try this for a demonstration: user@box> su passwd: root@box# mail no mail for user ------ su - (and su -l ...) Makes this a "real" login, which means that *everything* env. vars. and all gets set to 'root's values. Obviously, when you log in as root, you land in root's home, /root try the above with su - instead of plain su, and you'll see... Further try comparing the output of the command 'set' using the two different su methods... CMIIW/HTH Jon