My main username is not in the sudoers file

Open a Root Terminal and type visudo (to access and edit the list).

Navigate to the bottom of the sudoers file that is now displayed in the terminal.

Just under the line that looks like the following:

    root ALL=(ALL) ALL

Add the following (replacing user with your actual username):

    user ALL=(ALL) ALL

Now save the file. The procedure for this will depend on your editor:

  • nanoCtrlO then Enter, then CtrlX to exit
  • vim:wq

The simplest way to add an user to sudoers file is run the command bellow as user with permission to execute gpasswd:

sudo gpasswd -a username sudo

the process described at search: "psychocats ubuntu fixsudo" helped me on Lubuntu 13.04

Enter recovery mode then

mount -o rw,remount /

adduser username sudo