bash scripting chkconfig, chmod, and chown
I'm trying to write a simple(ler) bash script to does a mass changes in ~200 chmods, ~200 chowns, ~60 chkconfigs on 400+ systems. There's no real uniformity to any one of the three areas. I'm actually typing it in a very simplistic way...
if [ ! $UID -eq 0 ]; then
echo "This script must be run as root."
/sbin/chkconfig nfs on
/sbin/chkconfig sendmail off
chmod 400 /etc/at.allow
chown root:root /etc/at.allow
chmod 600 /etc/at.deny
chown root:root /etc/at.deny
chown lp:sys /etc/cups/cupsd.conf
Again this is a simplified and truncated form of my script. Any help or advice would be appreciated!