To add a user to the sudoers file, or to the sudo-list:
Make the sudoers file writable
chmod o+w /etc/sudoers
Add the username to the sudoers file
echo "username ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers (the NOPASSWD:ALL option prevents you from having to type your password when you do sudo)
Remove the writepermissions from the sudoers file
chmod o-w /etc/sudoers
Recente reacties