<html><body bgcolor="#FFFFFF"><div>Leave off the -   The - means to emulate logging in, including cwd ~ and loading the environment. <br><br><br><div>- Angelo</div><div><br></div><div>{via <span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">mobile device}</span></div>
</div><div><br>On Mar 9, 2011, at 7:09 AM, Steve VanSlyck &lt;<a href="mailto:s.vanslyck@spamcop.net">s.vanslyck@spamcop.net</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>

I&#39;ve asked Google, but Google wasn&#39;t feeling very helpful.<br>
<br>
When I become root via the &quot;SU -&quot; command, my current working directory is changed to root&#39;s home.<br>
<br>
&quot;info su&quot; says, <font color="#0000ff"><b>&quot;By default, &#39;su&#39; does not change the current directory. It sets the environment variables &#39;HOME&#39; and &#39;SHELL&#39; from the password entry for USER, and if USER is not the super-user, sets &#39;USER&#39; and &#39;LOGNAME&#39; to USER.&quot;</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&#39;s environment variables?<br>

<br>


</div></blockquote><blockquote type="cite"><div><span>Spam detection software, running on the system &quot;<a href="http://lists.colug.net">lists.colug.net</a>&quot;, has</span><br><span>identified this incoming email as possible spam.  The original message</span><br>
<span>has been attached to this so you can view it (if it isn&#39;t spam) or label</span><br><span>similar future email.  If you have any questions, see</span><br><span>the administrator of that system for details.</span><br>
<span></span><br><span>Content preview:  I&#39;ve asked Google, but Google wasn&#39;t feeling very helpful.</span><br><span>   When I become root via the &quot;SU -&quot; command, my current working directory is</span><br>
<span>   changed to root&#39;s home. &quot;info su&quot; says, &quot;By default, &#39;su&#39; does not change</span><br><span>   the current directory. It sets the environment variables &#39;HOME&#39; and &#39;SHELL&#39;</span><br>
<span>   from the password entry for USER, and if USER is not the super-user, sets</span><br><span>   &#39;USER&#39; and &#39;LOGNAME&#39; to USER.&quot; [...] </span><br><span></span><br><span>Content analysis details:   (5.0 points, 5.0 required)</span><br>
<span></span><br><span> pts rule name              description</span><br><span>---- ---------------------- --------------------------------------------------</span><br><span> 3.8 BAYES_99               BODY: Bayes spam probability is 99 to 100%</span><br>
<span>                            [score: 1.0000]</span><br><span> 1.2 DATE_IN_PAST_03_06     Date: is 3 to 6 hours before Received: date</span><br><span> 0.0 HTML_MESSAGE           BODY: HTML included in message</span><br>
<span></span><br><span></span><br></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>colug-432 mailing list</span><br><span><a href="mailto:colug-432@colug.net">colug-432@colug.net</a></span><br>
<span><a href="http://lists.colug.net/mailman/listinfo/colug-432">http://lists.colug.net/mailman/listinfo/colug-432</a></span><br></div></blockquote><blockquote type="cite"><div><span>Spam detection software, running on the system &quot;<a href="http://lists.colug.net">lists.colug.net</a>&quot;, has</span><br>
<span>identified this incoming email as possible spam.  The original message</span><br><span>has been attached to this so you can view it (if it isn&#39;t spam) or label</span><br><span>similar future email.  If you have any questions, see</span><br>
<span>the administrator of that system for details.</span><br><span></span><br><span>Content preview:  I&#39;ve asked Google, but Google wasn&#39;t feeling very helpful.</span><br><span>   When I become root via the &quot;SU -&quot; command, my current working directory is</span><br>
<span>   changed to root&#39;s home. &quot;info su&quot; says, &quot;By default, &#39;su&#39; does not change</span><br><span>   the current directory. It sets the environment variables &#39;HOME&#39; and &#39;SHELL&#39;</span><br>
<span>   from the password entry for USER, and if USER is not the super-user, sets</span><br><span>   &#39;USER&#39; and &#39;LOGNAME&#39; to USER.&quot; [...] </span><br><span></span><br><span>Content analysis details:   (5.0 points, 5.0 required)</span><br>
<span></span><br><span> pts rule name              description</span><br><span>---- ---------------------- --------------------------------------------------</span><br><span> 3.8 BAYES_99               BODY: Bayes spam probability is 99 to 100%</span><br>
<span>                            [score: 1.0000]</span><br><span> 1.2 DATE_IN_PAST_03_06     Date: is 3 to 6 hours before Received: date</span><br><span> 0.0 HTML_MESSAGE           BODY: HTML included in message</span><br>
<span></span><br><span></span><br></div></blockquote></body></html>