Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've got a handful of RHEL5 servers and I was wondering if you could copy a master sudoer file from one of the Linux servrs and over write the default one on all the other servers and have it work?

share|improve this question
up vote 1 down vote accepted

Depends on whether or not there are host-based restrictions in the sudoers file, but in the absence of those ("ALL" as the host restriction), yes you can.

visudo does not "compile" the file, only locks it and performs sanity audits to make sure you don't manage to lock yourself out.

share|improve this answer
Rock on, thanks Phil! – ridingnowhere Mar 1 '11 at 4:12

It might work. Or not. It all depends on how you customized the file. If you only or mostly have rules for users/groups/commands in it that are available on the other servers, sure, it will work. If you just have rules for user joe in it that don't exist on the other machines, it won't work.

share|improve this answer
Understood, thanks for the insight. Users/Groups will be the same across all servers. – ridingnowhere Mar 1 '11 at 4:13

It's certainly possible to do that successfully, but it depends entirely on the contents. You may have stuff in there that's specific to the original host and its environment. There may also be slight differences in compatibility if there are differences in distribution or version.

Since you may need to manually inspect the file anyway, why not use it as a model for the new files rather than copying it wholesale with crossed fingers?

It may also be a good opportunity to develop site standards that make doing things like this smoother.

share|improve this answer
All the servers are running the same distro, same kernel, and patched on the same cycle. The users/groups will be identical across all as well. – ridingnowhere Mar 1 '11 at 4:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.