Bug#69090: [firstname.lastname@example.org: Re: Bug#69090: strange su / which / apt behaviour]
----- Forwarded message from Jens Taprogge <email@example.com> -----
Date: Mon, 14 Aug 2000 00:17:02 -0700
From: Jens Taprogge <firstname.lastname@example.org>
To: Adrian Bunk <email@example.com>
On Mon, Aug 14, 2000 at 04:18:32AM +0200, Adrian Bunk wrote:
> You are looking for "su -".
> From the su man page:
> su is used to become another user during a login session.
> Invoked without a username, su defaults to becoming the
> super user. The optional argument - may be used to pro-
> vide an environment similiar to what the user would expect
> had the user logged in directly.
Still the PATH should be set to contain the sbin directories.
>From the manpage:
The current environment is passed to the new shell. The
value of $PATH is reset to /bin:/usr/bin for normal users,
or /sbin:/bin:/usr/sbin:/usr/bin for the super user. This
may be changed with the ENV_PATH and ENV_SUPATH
definitions in /etc/login.defs. When using the -m or -p
options, the users environment is not changed.
In /etc/login.defs the paths are set to:
As you can see from my original message the PATH does contain the sbin
directories (plus some extra ones).
Or is it not the PATH that matters?
> > Now when I use sudo things seem to be normal:
> > $ sudo which ldconfig
> > /sbin/ldconfig
> > $
> > On the other hand:
> > $ sudo -s
> > # which ldconfig
> > #
> sudo gives you only root permissions, but you aren't logged in as
> root. That means your PATH is set to the PATH of your user account.
So why does 'sudo which ldconfig' work?
> > Best Regards
> > Jens
----- End forwarded message -----