Ended up pushing the file out to all the servers, and running a remote ssh to execute them. Worked like a charm. I was more comfortable using Ghostdog74's method, and adapting it to fit my needs. Here is the way I did it below. You just have to make sure all your sudoers files are uniform across your environment first:
Here's how I pushed the files out to the servers:
NOTE: This is assuming you have your ssh key from your jump server distributed to the rest of the hosts, so you don't have to use a password to login.
#!/bin/ksh
for i in `serverlist.txt`
do
echo $i
ssh $i "/etc/change_sudo.sh"
echo
done > change_sudo.output
change_sudo.sh
#!/bin/ksh
cd /etc
cp sudoers sudoers.safe
change0="Host_Alias LOCALHOST = `hostname`"
awk -v c="$change0" '{print}
/# Host alias specification/{print c}
' "sudoers" > temp.sudoers
mv temp.sudoers sudoers
chown root:root sudoers
chmod 440 sudoers
change1="User_Alias ADMINS = someuser"
awk -v c="$change1" '{print}
/# User alias specification/{print c}
' "sudoers" > temp.sudoers
mv temp.sudoers sudoers
chown root:root sudoers
chmod 440 sudoers
sleep 02
change2="Cmnd_Alias MISC_CMDS = /usr/bin/make, /usr/bin/chmod, /usr/bin/awk, /usr/bin/cat,/usr/bin/chown, /usr/bin/cp, /usr/bin/cut, /usr/bin/diff,/usr/bin/grep, /usr/bin/ls, /usr/bin/mv, /usr/bin/rm,/usr/bin/sed, /usr/bin/sleep, /usr/bin/sort, /usr/bin/tail,/bin/echo, /bin/touch, /usr/bin/which"
awk -v c="$change2" '{print}
/# Cmnd alias specification/{print c}
' "sudoers" > temp.sudoers
mv temp.sudoers sudoers
chown root:root sudoers
chmod 440 sudoers
sleep 02
change3="Cmnd_Alias PROTECTED_CMDS = !/usr/bin/passwd root, !/usr/bin/rm -rf /*, !/usr/bin/chown root"
awk -v c="$change3" '{print}
/# Cmnd alias specification/{print c}
' "sudoers" > temp.sudoers
mv temp.sudoers sudoers
chown root:root sudoers
chmod 440 sudoers
sleep 02
change4="Cmnd_Alias ADMN_CMDS = /usr/sbin/groupadd, /usr/sbin/groupdel, /usr/sbin/groupmod, /usr/bin/last, /usr/bin/listusers, /usr/sbin/logins, /usr/sbin/usermod, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/passwd, /usr/bin/ypmatch, /usr/bin/yppasswd,/usr/sbin/ypcat, /usr/bin/login"
awk -v c="$change4" '{print}
/# Cmnd alias specification/{print c}
' "sudoers" > temp.sudoers
mv temp.sudoers sudoers
chown root:root sudoers
chmod 440 sudoers
sleep 02
change5="ADMINS LOCALHOST = MISC_CMDS,ADMIN_CMDS"
awk -v c="$change5" '{print}
/# User privilege specification/{print c}
' "sudoers" > temp.sudoers
mv temp.sudoers sudoers
chown root:root sudoers
chmod 440 sudoers
And here was the result:
Sudoers File Before:
#Host alias specification
# User alias specification
#Cmnd alias specification
# User privilege specification
Sudoers File After:
#Host alias specification
Host_Alias LOCALHOST = servername
# User alias specification
User_Alias ADMINS = someuser
#Cmnd alias specification
Cmnd_Alias ADMIN_CMDS = /usr/sbin/groupadd, /usr/sbin/groupdel, /usr/sbin/groupmod, /usr/bin/last, /usr/bin/listusers, /usr/sbin/logins, /usr/sbin/usermod, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/passwd, /usr/bin/ypmatch, /usr/bin/yppasswd,/usr/sbin/ypcat, /usr/bin/login
Cmnd_Alias PROTECTED_CMDS = !/usr/bin/passwd root, !/usr/bin/rm -rf /*, !/usr/bin/chown root
Cmnd_Alias MISC_CMDS = /usr/bin/make, /usr/bin/chmod, /usr/bin/awk, /usr/bin/cat,/usr/bin/chown, /usr/bin/cp, /usr/bin/cut, /usr/bin/diff,/usr/bin/grep, /usr/bin/ls, /usr/bin/mv, /usr/bin/rm,/usr/bin/sed, /usr/bin/sleep, /usr/bin/sort, /usr/bin/tail,/bin/echo, /bin/touch, /usr/bin/which
# User privilege specification
ADMINS LOCALHOST = MISC_CMDS,ADMIN_CMDS