Gentoo Archives: gentoo-user

From: William Hubbs <williamh@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Manual pages (man pages) have ESC all through them when having used sudo.
Date: Sun, 28 Feb 2010 22:03:06
Message-Id: 20100228212757.GA28248@linux1
In Reply to: Re: [gentoo-user] Manual pages (man pages) have ESC all through them when having used sudo. by stosss
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

Replies

Subject Author
Re: [gentoo-user] Manual pages (man pages) have ESC all through them when having used sudo. Alan McKinnon <alan.mckinnon@×××××.com>