On Wed, 7 Aug 2019 22:55:57 +0200
Thierry de Coulon <tcoulon(a)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