Sudo Cheat Sheet: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
*Allow apache to exec something | *Allow apache to exec something | ||
www-data ALL=NOPASSWD: /path/command | www-data ALL=NOPASSWD: /path/command | ||
*Allow vmadmin to exec something | |||
vmadmin ALL=(ALL:ALL) AL |
Revision as of 19:02, 29 September 2022
- 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
vmadmin ALL=(ALL:ALL) AL