Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

3 Answers 3

up vote 0 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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.