[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "su -" and "su" - what is the real difference?



On Fri, 28 Jul 2006, LeVA wrote:
> What is the difference (I mean in the "real world") between running `su` 
> (getting a non-login shell) and `su -` (getting a login shell). Is 

The same that using "/bin/su -" gains you: a bit more of defence against
someone doing nasty things to your environment.  Note the use of "a bit", as
in "a small ammount".

If you are going to use "-" for this reason, do the full thing and run
/bin/su - and not su -.  You don't want to trust $PATH either, after all.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Reply to: