Re: Why /usr/sbin is not in my root $PATH ?
- Date: Thu, 21 Feb 2019 11:15:07 +0300
- From: Reco <recoverym4n@xxxxxxxxxxxx>
- Subject: Re: Why /usr/sbin is not in my root $PATH ?
On Thu, Feb 21, 2019 at 09:07:09AM +0100, Pierre Couderc wrote:
> Why /usr/sbin is not in my root $PATH ?
> xxx@server:~$ su root
Because you did exactly this. su(1) says:
The optional argument - may be used to provide an environment similar to
what the user would expect had the user logged in directly.
Make a habit of using 'su -', as this behaviour is here to stay.
> Is it a bug somewhere in debian ? Installing snap ?
It's a change in Debian, see #833256.
There are two su utilities, from 'shadow' and from 'util-linux'.
Preserving user's environment unless '-' is specified is a feature of