1 |
On Sun, Feb 28, 2010 at 03:56:13PM -0500, stosss wrote: |
2 |
> On Sun, Feb 28, 2010 at 7:28 AM, pk <peterk2@××××××××.se> wrote: |
3 |
> > ubiquitous1980 wrote: |
4 |
> > |
5 |
> >>> http://lists.debian.org/debian-security/2006/07/msg00059.html |
6 |
> > |
7 |
> >> With "sudo su - " the man pages do not have ESC throughout. ?I have |
8 |
> >> learned sudo su from my ubuntu days and I am only guessing that this is |
9 |
> >> bad practice and that the correct command is $ sudo su - |
10 |
> > |
11 |
> > No need to guess. Messing with superuser privileges without a proper |
12 |
> > superuser environment (paths etc.) is considered bad from a security |
13 |
> > point of view; for instance, an malicious application could be installed |
14 |
> > in your user home dir, prepend the path to this to your local user $PATH |
15 |
> > and whenever you do "su" (without -) you could invoke this app with |
16 |
> > superuser privileges... |
17 |
> > So to summarize: The link above (debian.org) explains it quite well and |
18 |
> > yes, I would say it's a bad habit to omit -. :-) |
19 |
> |
20 |
> 7 years ago a veteran Linux user taught me to always use su - for the |
21 |
> very reason you stated. |
22 |
|
23 |
Actually, you are safe with either "su -" (without sudo) or "sudo -i". |
24 |
"sudo su -" is chaining "su -" on top of sudo, and is redundant because |
25 |
"sudo -i" and "su -" do the same thing afaik. |
26 |
|
27 |
William |