On Wed, 7 Oct 2020 09:52:43 -0400 Greg Wooledge wrote:
> There is no /etc/default/su file by default, but if you create one and
> put
>
> ALWAYS_SET_PATH yes
>
> in it, then su *does* change the PATH variable, and this avoids the
warning
> message from login.
>
> ii util-linux 2.33.1-0.1 amd64 miscellaneous system utilities
>
> unicorn:~$ cat /etc/default/su
> ALWAYS_SET_PATH yes
> unicorn:~$ echo "$PATH"
>
/home/greg/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin
> unicorn:~$ su
> Password:
> root@unicorn:/home/greg# echo "$PATH"
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> root@unicorn:/home/greg#
>
>
This has been done on stretch, but has no effect on this:
gene@coyote:~$ sudo -i
[sudo] password for gene:
root@coyote:~$ su amanda -c "geany bak-indices-configs"
configuration error - unknown item 'ALWAYS_SET_PATH' (notify administrator)
Is there a better fix for uptodate stretch?