Am 2012-10-11 11:29, schrieb Peter Hessler:
On 2012 Oct 11 (Thu) at 11:15:24 +0200 (+0200), Bernd wrote:
:Am 2012-10-11 10:38, schrieb Bernd:
:>Hi,
:>
:>I've got to port some shell scripts which rely on env vars. One
:>amongst those is $SSH_CLIENT.
:>
:>On OpenBSD 5.1 machines, I don't get what I'd assume to get:
:>
:># echo $SSH_CLIENT
:>
:>It returns just a blank line.
:
:Logged in as normal user, became root via 'su -'. That triggers
:mentioned behavior, just using 'su' keeps it behaving as expected.
:

$ man su
...
     -       Same as the -l option (deprecated).
...
-l Simulate a full login. The environment is discarded except for HOME, SHELL, PATH, TERM, LOGNAME, and USER. HOME and SHELL are
             modified as above.  LOGNAME and USER are set to the
target login.
PATH is set to the value specified by the ``path'' entry in login.conf(5). TERM is imported from your current environment. The invoked shell is the target login's, and su will change
             directory to the target login's home directory.

Known for decades, sure. Still wonder what changed. Machines are pretty extremely default setups.

Bernd

Reply via email to