On 2023-09-05, Greg Wooledge wrote: > You used "su" to become root, I believe. Unfortunately, beginning > with Debian 9, "su" with no arguments and no configuration doesn't > behave the way it used to behave. Specifically, it no longer sets the > PATH variable properly. And so you get the above results. > > See <https://wiki.debian.org/NewInBuster#Changes> for the options > available to you. If you wish to continue using su, I strongly recommend > creating a /etc/default/su file.
I have no /etc/default/su and never need one. According to the man page su also reads /etc/login.defs. To get root env she only needs to use: "su -"