Recipe 5.7 Granting Privileges to a Group via sudo

5.7.1 Problem

Let a set of users run commands as another user.

5.7.2 Solution

Define a Linux group containing those users:

/etc/group: mygroup:x:1200:joe,jane,hiram,krishna

Then create a sudo rule with the %groupname syntax:

/etc/sudoers: # Let the group run a particular program: %mygroup  ALL = (root) /usr/local/bin/mycommand arg1 arg2 # Give full superuser privileges to the group %mygroup  ALL = (ALL) ALL

5.7.3 See Also

sudo(8), sudoers(5), group(5).



Linux Security Cookbook
Linux Security Cookbook
ISBN: 0596003919
EAN: 2147483647
Year: 2006
Pages: 247

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net