Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have several users, which are all part of group X.

And I want to be able to give user Y to sudo to members of group X.

Obviously I don't want to edit sudoers everytime I add a user to group X, is there an elegant way to solve this? sudoers doesn't seem to have syntax for this.

share|improve this question

1 Answer 1

Wherever you can write a user name (User list or Runas list), you can write % followed by a group name instead.

Y ALL = (%X) ALL
share|improve this answer

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.