On Wed, Jul 21, 2010 at 10:01 AM, James <jucziz6 at gmail.com> wrote:

> Anyone ever use rsync to propagate the sudoer file?
>
>
I've found that often times the best way to copy a file while preserving its
permissions is to wrap it up in a tarball, move the tarball, extract it, and
wallah - permissions that never get borked.  Perhaps not as graceful as
having rsync do it all, but whenever I've mirrored file and filesystems with
files owned by root and containing setuid binaries or very restrictive files
like the sudoers file, tar has preserved permissions the most faithfully for
me.

If you're having trouble coaxing rsync into doing the right thing, you could
also wrap the rsync in a script, use rsync to move the bits, and have your
script enforce permissions with chmods and chowns and chgrps after the
rsync.

Maybe you're not running an enterprise environment, but the "super-slick
professional way" to mirror your sudoers file would be to manage it in
subversion or something and distribute it with cfengine.  That might be
overkill for you, but it could be a fun experiment. :)  Some links you might
peruse:

http://en.wikipedia.org/wiki/Comparison_of_open_source_configuration_management_software
http://www.cfengine.org/pages/manual_guides
http://watson-wilson.ca/blog/cfcookbook.html   (Search for sudoers on this
page)

-Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20100721/081f54ce/attachment.htm