I'm afraid I locked myself out of the sudo/root options. The one account that had sudo rights now reports that it doesn't have these anymore. How can I restore this? Do I need to use a live stick?
I'm afraid I locked myself out of the sudo/root options. The one account that had sudo rights now reports that it doesn't have these anymore. How can I restore this? Do I need to use a live stick?
passwd root
passwd username
No sudo rights for your user can be caused due to multiple reasons.
I suggest trying Naveen's answer first, but in some cases dropping to the root shell doesn't work (for instance, you get the message "Give root password for maintenance").
In the latter case, you should try booting an Ubuntu Live CD, and mount the partition that contains your Ubuntu filesystem and you should
chroot
to your root filesystem.In the case your user isn't part anymore of the sudo group (you can check this by issuing
groups <username>
from your terminal), you'll have to re-add your user to the sudo group:adduser <username> sudo
,Also make sure the
/etc/sudoers
file contains the following entry for the sudo group:%sudo ALL=(ALL:ALL) ALL
This website shows the first part of this procedure in more detail