trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: August 2019

Re: [trinity-users] PATH not set for root on Buster

From: "E. Liddell" <ejlddll@...>
Date: Wed, 7 Aug 2019 20:20:14 -0400
On Wed, 7 Aug 2019 22:55:57 +0200
Thierry de Coulon <tcoulon@...> 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