Sunday, August 5, 2012

[Ubuntu] User is not in the sudoers file

1. Reboot the system
2. Boot into "Recovery" mode
3. Select "Root Session"
4. Execute command as following to remount root filesystem
mount -o remount,rw /
5. Edit /etc/sudoers to add username to sudo user
# User privilege specification
username     ALL=(ALL:ALL) ALL
6. Reboot

Error: "usermod: cannot lock /etc/passwd; try again later"