I understand this is a Debian problem, not a TDE problem, however:
On one machine I have installed Debian Stretch + TDE; no problem. On the same machine I installed (on another partition) Buster + TDE. Seems to work, however most commands don't work from konsole with su.
The reason is that the path does not contain important directories.
Now the following I don't really understand:
The path is ok in the different files I could check. I've added "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" to /root/.profile but it does not work.
The result is that a command such as dpkg -i or dpkg-reconfigure does not work, until I issue the export PATH= directly in konsole
Debian is fresh installed with netinstall. This is really inconvenient, so of there is no way to cure it I'm going back to Stretch.
Thierry
Anno domini 2019 Wed, 7 Aug 22:19:22 +0200 Thierry de Coulon scripsit:
I understand this is a Debian problem, not a TDE problem, however:
On one machine I have installed Debian Stretch + TDE; no problem. On the same machine I installed (on another partition) Buster + TDE. Seems to work, however most commands don't work from konsole with su.
The reason is that the path does not contain important directories.
Now the following I don't really understand:
The path is ok in the different files I could check. I've added "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" to /root/.profile but it does not work.
The result is that a command such as dpkg -i or dpkg-reconfigure does not work, until I issue the export PATH= directly in konsole
Debian is fresh installed with netinstall. This is really inconvenient, so of there is no way to cure it I'm going back to Stretch.
Thierry
Ran into the same thing. Looks like when changing to root via "su", the environment and path is from the users .profile, which does not include /sbin (any more?)
nik
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On Wednesday 07 August 2019 22.25:01 Dr. Nikolaus Klepp wrote:
Ran into the same thing. Looks like when changing to root via "su", the environment and path is from the users .profile, which does not include /sbin (any more?)
nik
Just after posting I found an "answer" that's more a puzzle to me but does provide a solution.
Seems Buster changed the package providing su. I found this on StackExchange:
"Note that according to Debian Wiki, previous versions of Debian used a version of su from the shadow source package, while Buster uses one from the util-linux sources, which won't auto-add the /sbin and /usr/sbin directories to PATH when switching to root. If you need to approximate the old behavior, you can set ALWAYS_SET_PATH yes in /etc/login.defs. – telcoM Jul 6 at 20:23"
Some other place I read that "using su is bad" so we should now use "su -" to get a clean environment every time. ?!? . I allready never understood why using sudo would be better than using su, now this stuff about environment does not make sense to me either.
Anyway, for those of us using su and not wanting to change the way we use it, just add ALWAYS_SET_PATH yes in /etc/login.defs and everything is fine.
Thierry
On 8/7/19, Thierry de Coulon tcoulon@decoulon.ch wrote:
Seems Buster changed the package providing su. I found this on StackExchange:
I discovered the same thing. The solution I use is to always launch su with "-", so, "su -"
or "sudo su -"
That loads the complete su profile. It also changes to the /root directory, which is annoying.
Every Debian update, there's always _something_!
Curt-
On Wed, 7 Aug 2019 22:55:57 +0200 Thierry de Coulon tcoulon@decoulon.ch wrote:
Some other place I read that "using su is bad" so we should now use "su -" to get a clean environment every time. ?!? . I allready never understood why using sudo would be better than using su, now this stuff about environment does not make sense to me either.
The environment thing is mostly about making sure that environment variables that are set by your user and not by root don't leak into root's environment. 99% of the time the leaking variables are harmless, but they can occasionally be the source of some weird and subtle bugs. So typing the extra " -" may save you days or weeks of wrangling on mailing lists/message boards/reddit/whatever.
As for sudo being better than su, well, it isn't. It just presents a different set of security and convenience tradeoffs.
E. Liddell