Ubuntu – not in sudoers file – ONCE AND FOR ALL !

Yeah I feel your pain indeed…

  • restart the computer
  • hit SHIFT key if you don’t see GRUB on startup
  • choose recovery in the menu
  • go to shell if not yet there
  • dont edit the sudoer file, check that @includedir /etc/sudoers.d is not commented
cat /etc/sudoers
  • add a file to that folder (no dots in the filename, make it simple)
nano /etc/sudoers.d/yourusername
  • add this line to the file
yourusername ALL=(ALL) ALL
  • change the permissions
chmod  0440 /etc/sudoers.d/yourusername
  • reboot

You’re welcome…

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate ยป