Configure sudoers with cfengine
Hi all,
I have a network that uses cfengine with Centos 4 and 5. I'm trying to get the sudoers file updated with cfengine. I know I can kludge a cfengine config for sudoers on a line-by-line basis like this:
AppendIfNoSuchLine "jsmith host1=/etc/rc.d/init.d/coldfusionmx restart"
AppendIfNoSuchLine "jsmith host1=/bin/chown"
AppendIfNoSuchLine "jsmith host2=/etc/rc.d/init.d/coldfusionmx restart"
AppendIfNoSuchLine "jsmith host2=/bin/chown"
The regular sudoers file goes something like this:
Host_Alias COLDFUSIONHOSTS=host1,host2
User_Alias COLDFUSIONFOLKS=jsmith,mjones
COLDFUSIONFOLKS COLDFUSIONHOSTS=/etc/rc.d/init.d/coldfusionmx,/bin/chown
Optimally, I would like to get the cfengine file to have one line to manage multiple hosts and/or users. So, how can I combine the User_Alias, Host_Alias, and their associated commands into the cfengine config without the line-by-line kludge?
|