Sudo Cheat Sheet: Difference between revisions

From Coolscript
Jump to navigation Jump to search
(Created page with "*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 somethi...")
 
No edit summary
Line 2: Line 2:
  visudo /etc/sudoers
  visudo /etc/sudoers


*Ask for root password when exwec '''sudo -i'''
*Ask for root password when exec '''sudo -i'''
  Defaults rootpw
  Defaults rootpw



Revision as of 21:29, 19 May 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