Link to home
Start Free TrialLog in
Avatar of sonriks
sonriks

asked on

sudoers file

Can the same sudoers file be used on both Solaris and HPUX servers?
Or are the formats distinct?
Thanks!
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Hi,

formats are the same. No problem!

wmp
usually you can but here are some things you want to check for -

1) command paths might be different for your commands
2) commands that use different switches
3) different commands in general

an easy way to test syntax only is to run a verify

/usr/sbin/visudo -c -f /etc/sudoers.new

where c is the check and -f is the file
ASKER CERTIFIED SOLUTION
Avatar of Tomunique
Tomunique
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sonriks
sonriks

ASKER

This looks like what I was searching for. I have yet to implement, but thanks in advance for the excellent response.
We use the same sudoers file across 200+ systems  

recommendation:  plan ahead, and strive towards group permissions, so you're not having to modify the file every time a single user needs something different..

using the % in the user_alias stmts, it will check the unix group permissions.

User_Alias PRODCTL=%prodctl
Then in the cmds..
PRODCTL NEWIAM=(root) /usr/local/bin/yumcvs *

PRODCTL can issue the yumcvs command on the NEWIAM servers as root (and requires a parm to be passed).
This way, the security team adds a user to the prodctl group, and the sudoers file never needs to be touched.

Thanks for the points :)