Linux Ubuntu – User not in the sudoers file
If your user is not in the sudoers file you won’t be able to do any root tasks.
To fix this:
1. Boot into the recovery mode and load the root console. (Hold left shift on boot to show the Grub loader)
2. To make the file system writable execute: mount -o remount,rw /
3. Add user to the group admin by executing: adduser username admin (additionally you can add the user in the sudoers file, command: visudo)
4. To finalize the changes execute: sync ; mount -o remount,ro / ; reboot -f