[sudo-users] Distributing the sudoers file using rsync as a non root user

Hugh_Pierce at freddiemac.com Hugh_Pierce at freddiemac.com
Wed Sep 29 14:18:21 EDT 2004


I believe I have a solution.  I put together pieces from different sources.

   Create a user called rsync that is local to all boxes.
   Generate no-password keys for rsync and distribute public keys.
   Add the following to /etc/sudoers file:  rsync ALL = (root)
   NOPASSWD:/usr/local/bin/rsync, /usr/bin/rsync
   Run this command as root:  rsync -azv --rsync-path="/usr/local/bin/sudo
   /usr/local/bin/rsync" --rsh="/usr/bin/ssh -i
   /export/home/rsync/.ssh/id_dsa" /etc/sudoers rsync at server:/etc/sudoers

Of course this won't help you get the sudoers file out there unless you
already have the entry for rsync in there.




More information about the sudo-users mailing list