[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why /usr/sbin is not in my root $PATH ?



	Hi.

On Thu, Feb 21, 2019 at 09:07:09AM +0100, Pierre Couderc wrote:
> Hi
> 
> 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
util-linux's su.

Reco


Reply to: