Well, now I feel redundant... :) I missed the rest of the thread in my mail client.<br><br>Jason<br><br><div class="gmail_quote">On Wed, Mar 9, 2011 at 9:38 AM, Jason Marshall <span dir="ltr"><<a href="mailto:jason.marshall@gmail.com">jason.marshall@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The '-' in the 'su -' command you are running forces a login shell when the command executes, loading root's environment and parking you in his home directory.<br>
<br>If you run it without the hyphen, you will be root, but without the other environment variables set (PATH, etc.). This will also keep you in the current directory.<br>
<br>Jason<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Mar 9, 2011 at 2:08 AM, Steve VanSlyck <span dir="ltr"><<a href="mailto:s.vanslyck@spamcop.net" target="_blank">s.vanslyck@spamcop.net</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">
<div>
I've asked Google, but Google wasn't feeling very helpful.<br>
<br>
When I become root via the "SU -" command, my current working directory is changed to root's home.<br>
<br>
"info su" says, <font color="#0000ff"><b>"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."</b></font><br>
<br>
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?<br>
<br>
</div>
<br></div></div><div class="im">Spam detection software, running on the system "<a href="http://lists.colug.net" target="_blank">lists.colug.net</a>", has<br>
identified this incoming email as possible spam. The original message<br>
has been attached to this so you can view it (if it isn't spam) or label<br>
similar future email. If you have any questions, see<br>
the administrator of that system for details.<br>
<br></div>
Content preview: I've asked Google, but Google wasn't feeling very helpful.<div class="im"><br>
When I become root via the "SU -" command, my current working directory is<br>
changed to root's home. "info su" says, "By default, 'su' does not change<br>
the current directory. It sets the environment variables 'HOME' and 'SHELL'<br>
from the password entry for USER, and if USER is not the super-user, sets<br></div>
'USER' and 'LOGNAME' to USER." [...]<div class="im"><br>
<br>
Content analysis details: (5.0 points, 5.0 required)<br>
<br>
pts rule name description<br>
---- ---------------------- --------------------------------------------------<br>
3.8 BAYES_99 BODY: Bayes spam probability is 99 to 100%<br>
[score: 1.0000]<br>
1.2 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date<br>
0.0 HTML_MESSAGE BODY: HTML included in message<br>
<br>
<br>
<br>_______________________________________________<br>
colug-432 mailing list<br>
<a href="mailto:colug-432@colug.net" target="_blank">colug-432@colug.net</a><br>
<a href="http://lists.colug.net/mailman/listinfo/colug-432" target="_blank">http://lists.colug.net/mailman/listinfo/colug-432</a><br>
<br>Spam detection software, running on the system "<a href="http://lists.colug.net" target="_blank">lists.colug.net</a>", has<br>
identified this incoming email as possible spam. The original message<br>
has been attached to this so you can view it (if it isn't spam) or label<br>
similar future email. If you have any questions, see<br>
the administrator of that system for details.<br>
<br></div>
Content preview: I've asked Google, but Google wasn't feeling very helpful.<div class="im"><br>
When I become root via the "SU -" command, my current working directory is<br>
changed to root's home. "info su" says, "By default, 'su' does not change<br>
the current directory. It sets the environment variables 'HOME' and 'SHELL'<br>
from the password entry for USER, and if USER is not the super-user, sets<br></div>
'USER' and 'LOGNAME' to USER." [...]<div class="im"><br>
<br>
Content analysis details: (5.0 points, 5.0 required)<br>
<br>
pts rule name description<br>
---- ---------------------- --------------------------------------------------<br>
3.8 BAYES_99 BODY: Bayes spam probability is 99 to 100%<br>
[score: 1.0000]<br>
1.2 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date<br>
0.0 HTML_MESSAGE BODY: HTML included in message<br>
<br>
<br>
<br></div></blockquote></div><br>
</blockquote></div><br>