comtrya
comtrya copied to clipboard
Feature: Support adding users/groups to sudoers
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