]> git.ipfire.org Git - thirdparty/util-linux.git/commit
su: add --group and --supp-group options
authorKarel Zak <kzak@redhat.com>
Tue, 28 Aug 2012 14:32:28 +0000 (16:32 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Sep 2012 15:00:30 +0000 (17:00 +0200)
commit8528ea2f81487142047a49ec6601a745f2eab365
tree2260c6946db300c7decaaf8429f6fee9e64333f1
parent4e1073c23b4208de3df1dc32ffc5cf59bcf78ef8
su: add --group and --supp-group options

These options allow to specify alternative groups. The command
su(1) has to be executed by root. The implementation is based on
Fedora runuser(1) command.

For example:

 # su --group=kzak --supp-group=uuidd -
 # id
 uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak)

non-root user:

 $ su --group=kzak -
 su: only root can specify alternative groups

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su.1
login-utils/su.c