On Sun, 8 Sep 2019 03:57:58 +0200 Karsten <deb...@decotrain.de> wrote:
> Am 06.09.19 um 00:41 schrieb Markus Koschany:
> > This is a new behavior because the util-linux implementation of su is
> > used now. See also /usr/share/doc/util-linux/NEWS.Debian.gz for more
> > information.
> >
> > "If you want to restore behaviour more similar to
> >   the previous one you can add 'ALWAYS_SET_PATH yes'
> > in /etc/login.defs."
> >
> > Markus
>
> Thanks.
> My /etc/login.defs is now
>
> #
> # *REQUIRED*  The default PATH settings, for superuser and normal users.
> #
> # (they are minimal, add the rest in the shell startup files)
> ENV_SUPATH
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> ENV_PATH
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
>
>
>
> This seems to work.
> But to solve the problem this should be added by default.
> Then this bug can be closed.
>
> Cheers
> karsten


I think this no _not_ a good idea. The semantics of 'su' is correct. The
only error is that many users up to day count on the wrong behaviour. If
you want the PATH being changed, use the 'login' variant of 'su':

$ su - -c 'command'

or simply:

$ su -

for a login. Alternatively, you can use

  1)$ su -c 'PATH=/usr/sbin:/sbin:/usr/local/sbin:$PATH command'

  2)$ sudo command

You can set 'ALWAYS_SET_PATH yes' for your installation, but generally - in
a default install - this would be sooo wrong, especially because there many
alternatives.

Greetings
Boris

[https://ueberbau.igp-ag.com/temp/expowerbung.png]<https://www.exporeal.net>

Metis Systems AG | Friedrichstraße 185 | 10117 Berlin | Deutschland
Tel: +49 (30) 521079-100 | E-Mail: i...@metis-ag.com<mailto:i...@metis-ag.com>

Aufsichtsratsvorsitzender: Markus Molnár
Vorstandsvorsitzender: Tobias Dobberphul
Vorstand: Christian Werner
Sitz der Gesellschaft: Amtsgericht Berlin-Charlottenburg HRB 194708 B | 
Finanzamt für Körperschaften IV | Steuer-Nr.: 30/057/75584


Diese E-Mail, einschließlich sämtlicher mit ihr übertragenen Dateien, ist 
vertraulich und für die ausschließliche Verwendung durch die Person oder das 
Unternehmen vorgesehen, an die/das sie adressiert ist. Sollten Sie diese E-Mail 
fälschlicherweise erhalten haben, benachrichtigen Sie bitte den 
Systemverwalter. Diese E-Mail wurde auf die Anwesenheit von Computerviren 
überprüft.

Reply via email to