[Ilugc] sudo file on multiple machines

  • From: mehul.n.ved@xxxxxxxxx (Mehul Ved)
  • Date: Wed, 18 Jul 2012 14:30:26 +0530

On Wed, Jul 18, 2012 at 8:23 AM, Ashish Verma <ilugid at gmail.com> wrote:

I have 4 machines..

server1
server2
server3
server4
I have configured sudo file on server1. I want all other servers to use the
same file. Everytime I update the file I shouldnt have to copy it to all
other servers, instead they should use the same file.

One way I can think of is using inotify + rsync. Use inotify to
monitor changes to the file. Whenever the sudoers file is changed, use
the rsync script to copy it over to the other machines.
You can can replace rsync with version control tools like git so you
can even version the various revisions of the file.

Other related posts: