Problem: Let a set of users run commands as another user,
Solution: Define a linux group containing those users,
/etc/group:
mygroup:x:1200:joe,jane,hiram,krishna
then create a sudo rule with the %groupname syntax:
/etc/sudoers:
# let the group run a particular program
%mygroup ALL = (root) /usr/local/bin/mycommand arg1 arg2
# give full superuser privilages to the group
%mygroup ALL = (ALL) ALL
Solution: Define a linux group containing those users,
/etc/group:
mygroup:x:1200:joe,jane,hiram,krishna
then create a sudo rule with the %groupname syntax:
/etc/sudoers:
# let the group run a particular program
%mygroup ALL = (root) /usr/local/bin/mycommand arg1 arg2
# give full superuser privilages to the group
%mygroup ALL = (ALL) ALL
No comments:
Post a Comment