NAME

lcfg-sudo - Configure sudo

DESCRIPTION

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.

RESOURCES

sudoers

The config file to create. Defaults to /etc/sudoers

useraliases

A list of User_Alias line tags

useralias_tag

The User_Alias line for tag

runasaliases

A list of Runas_Alias line tags

runasalias_tag

The Runas_Alias line for tag

hostaliases

A list of Host_Alias line tags

hostalias_tag

The Host_Alias line for tag

cmndaliases

A list of Cmnd_Alias line tags

cmndalias_tag

The Cmnd_Alias line for tag

defaults

A list of Defaults line tags

Defaults_tag

The Defaults line for tag

entries

A list of user specification line tags

entry_tag

The user specification line for tag

EXAMPLES

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

PLATFORMS

Fedora3, Solaris9, Fedora5, Fedora6, Scientific5, Darwin

AUTHOR

Michael Gordon <mfg@see.ed.ac.uk>