You can try entering the emergency recovery mode.
Alternatively, boot from a CD or DVD, and mount the drive (say, to /media/hdd
). Then, enter the old system via a chroot with
sudo chroot /media/hdd
Once you're in - either via emergency recovery mode or CD/chroot -, fix the problem by editing /etc/sudoers
(for example, with the command visudo
).
It should read like
Defaults env_reset
root ALL=(ALL) ALL
%sudo ALL=(ALL) ALL
Also, make sure that your user is still in the sudo
group, with the command
usermod -G sudo -a travis
(Most likely, you executed usermod -G
without the -a
parameter if that's the case).
You can try out sudo by typing su travis
, and then sudo -s
. If sudo
fails, type exit
(or press Ctrl+D to get back to your root shell. After you've fixed the problem, simply reboot your old system (remove the CD/DVD beforehand) and everything should work again.