Sudo Cheat Sheet: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
*Allow vmadmin to exec something | *Allow vmadmin to exec something | ||
admin ALL=(ALL:ALL) ALL |
Revision as of 17:11, 11 February 2023
- Edit
visudo /etc/sudoers
- Ask for root password when exec sudo -i
Defaults rootpw
- Add user to sudo group
usermod -aG sudo username
- Allow apache to exec something
www-data ALL=NOPASSWD: /path/command
- Allow vmadmin to exec something
admin ALL=(ALL:ALL) ALL