Gentoo Archives: gentoo-user

From: Mark Shields <laebshade@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] su doesn't work for me.
Date: Sun, 10 Apr 2011 22:34:16
Message-Id: BANLkTimfiuDwYBX0-7hJa1oekq+ZLeCAFA@mail.gmail.com
In Reply to: Re: [gentoo-user] su doesn't work for me. by Alan McKinnon
1 On Sun, Apr 10, 2011 at 10:08 AM, Alan McKinnon <alan.mckinnon@×××××.com>wrote:
2
3 > Apparently, though unproven, at 16:28 on Sunday 10 April 2011, Dale did
4 > opine
5 > thusly:
6 >
7 > > > That was it! I've now got su-ability from that normal user.
8 > > >
9 > > > Funny, though, on my (very) old Debian system I don't seem to have a
10 > > > wheel.
11 > > >
12 > > > Thanks.
13 > > >
14 > > >> Best regards,
15 > > >> Yann
16 > >
17 > > I think that is a Gentoo thing. It does add some security if you don't
18 > > want a user, like maybe some little kid, getting root access for any
19 > > reason.
20 >
21 > No, it's pretty standard across Unix.
22 >
23 > The BSD's for example have had it since forever - members of the wheel
24 > group
25 > being allowed to sudo anything only came along much later.
26 >
27 > Leaving it *out* is a Linux-distro thing, probably from the usual usage
28 > case
29 > for Linux for many years - a server on the web that actually only had one
30 > user
31 > even though it was capable of being fully multi-user. The concept of wheel
32 > for
33 > su is pretty redundant in that case.
34 >
35 >
36 > --
37 > alan dot mckinnon at gmail dot com
38 >
39 >
40 Wheel has nothing to do with su; it has everything to do with sudo, but only
41 if /etc/sudoers is edited to allow the Wheel group sudo access. Su is for
42 changing to a different user, or running a command as another user; doing
43 either requires the password of that user; sudo, on the other hand, only
44 requires your password, if you're in the wheel group and the wheel group is
45 given full sudo access, and the sudo access for wheel requires your
46 password.
47
48 Some examples, assuming your user (the one you're logged in as) is in wheel
49 and requires a password for sudo access (see: visudo):
50
51 sudo su <--- escalates you to root user with your own password. This is
52 running "su" with "sudo".
53 su user <--- switches to "user" with their password required to be entered
54 sudo su user < -- switch to "user" with your password required to be entered
55 sudo <command> <-- runs command as root
56 sudo -u user <command> <--- runs command as "user"
57 sudo su - user <--- escalates you to "user" and cd's to their home directory
58
59 Please read the man pages for sudo and su for more info.

Replies

Subject Author
Re: [gentoo-user] su doesn't work for me. Alan McKinnon <alan.mckinnon@×××××.com>