Sudo Cheat Sheet
- Edit
visudo /etc/sudoers
- Ask for root password when exwec sudo -i
Defaults rootpw
- Add user to sudo group
usermod -aG sudo username
- Allow apache to exec something
www-data ALL=NOPASSWD: /path/command
visudo /etc/sudoers
Defaults rootpw
usermod -aG sudo username
www-data ALL=NOPASSWD: /path/command