[colug-432] Prevent SU from changing CWD

Steve VanSlyck s.vanslyck at spamcop.net
Wed Mar 9 02:08:44 EST 2011


I've asked Google, but Google wasn't feeling very helpful.

When I become root via the "SU -" command, my current working directory
is changed to root's home.

"info su" says, "By default, 'su' does not change the current directory.
It sets the environment variables 'HOME' and 'SHELL' from the password
entry for USER, and if USER is not the super-user, sets 'USER' and
'LOGNAME' to USER."

I think that means that SU asks root what directory to change to. Are
there any hints or tips someone can give me on how to prevent SU from
changing the current working directory, ideally without having to modify
root's environment variables?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20110309/bf46376d/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SpamAssassinReport.txt
Url: http://lists.colug.net/pipermail/colug-432/attachments/20110309/bf46376d/attachment.txt 


More information about the colug-432 mailing list