comtrya icon indicating copy to clipboard operation
comtrya copied to clipboard

Feature: Support adding users/groups to sudoers

Open JustinBacher opened this issue 4 months ago • 3 comments

Description I know it's frowned upon (but I'm sure many people do this) I like being able to just type: reboot and not sudo reboot and I also don't like typing in my password in multiple times every time I run commands requiring root.

I suggest adding an option to user.add and group.add that modifies the /etc/sudoers file accordingly.

Manifest Example

- action: group.add
  group_name: testgroup
  sudoer: ALL=(ALL:ALL)

- action: user.add
  fullname: testuser
  username: test
  sudoer: ALL=(ALL) NOPASSWD: ALL

Would result in /etc/sudoers file having these lines added:

%testgroup ALL=(ALL:ALL)
test ALL=(ALL) NOPASSWD: ALL

JustinBacher avatar Oct 15 '24 17:10 JustinBacher