lcfg-sudo - Configure sudo
This component creates /etc/sudoers from LCFG tagged resources.
Each resource's value is a verbatim line in the /etc/sudoers file. The lines are written to the file in the following order: user aliases, host aliases, command aliases, defaults and finally entries. Within each type the lines are written in the order of the tags in the LCFG profile.
You can change the managed file by setting the sudoers resource.
The config file to create. Defaults to /etc/sudoers
A list of User_Alias line tags
The User_Alias line for tag
A list of Runas_Alias line tags
The Runas_Alias line for tag
A list of Host_Alias line tags
The Host_Alias line for tag
A list of Cmnd_Alias line tags
The Cmnd_Alias line for tag
A list of Defaults line tags
The Defaults line for tag
A list of user specification line tags
The user specification line for tag
sudo.useraliases admins
sudo.useralias_admins User_Alias ADMINS = alice,bob
sudo.cmndaliases shutdown
sudo.cmndalias_shutdown Cmnd_Alias SHUTDOWN = /sbin/halt, /sbin/reboot, /sbin/shutdown
sudo.defaults syslog
sudo.default_syslog Defaults syslog=auth
sudo.entries root rdxprof om halt
sudo.entry_root root ALL = (ALL) ALL
sudo.entry_rdxprof ADMINS ALL = NOPASSWD: /usr/sbin/rdxprof
sudo.entry_om ADMINS ALL = NOPASSWD: /usr/bin/om
sudo.entry_halt ADMINS ALL = NOPASSWD: SHUTDOWN
The above resources would result in this /etc/sudoers file
# LCFG generated /etc/sudoers - do not edit
User_Alias ADMINS = alice,bob
Cmnd_Alias SHUTDOWN = /sbin/halt, /sbin/reboot, /sbin/shutdown
Defaults syslog=auth
root ALL = (ALL) ALL
ADMINS ALL = NOPASSWD: /usr/sbin/rdxprof
ADMINS ALL = NOPASSWD: /usr/bin/om
ADMINS ALL = NOPASSWD: SHUTDOWN
Fedora3, Solaris9, Fedora5, Fedora6, Scientific5, Darwin
Michael Gordon <mfg@see.ed.ac.uk>