1

Okay, here's my problem. I was being an idiot and installed compiz-core on my Xubuntu 12.10. So there I was, trying to figure out how to fix my issue, and I did sudo xfwm4 --replace.

Then I was unable to login. So I logging with guest, delete my old account, without deleting the home folder, of course, and I create a new account "michael2". Instead of creating a new home folder for it, I instead instructed the program to use my old home folder. Unfortunately, it completely erased the folder, along with over 150GB worth of downloads and about 200 hours worth of work (I work from home, so, yeah).

And to top it all off, whenever I try to use the sudo command, I get the error

michael2 is not in the sudoers file. This incident will be reported.

I don't know how to fix this, nor can I login to root (I never set the root password, because I never had the need to login as root to do anything).

Any help will be appreciated. Is there maybe a way that I can do system restore to restore my previous files and username? I need answers as soon as possible, because I'm literally losing money by the second (the entire work from home kinda thing).

2 Answers 2

1

To regain root access, you will need to boot in recovery mode. When you reach GRUB, select an entry labeled "(...) Recovery mode".

After some time you should get a screen similar to this one, when you should select "Drop to root shell prompt"

enter image description here

Then you will be in a shell as root, and can add your used to the sudo group again:

usermod -a -G adm <your_username>
usermod -a -G sudo <your_username>

After reboot, you should have again sudo permissions. If that's not the case, repeat the procedure but use visudo to add yourself to the sudoers file.

0

You'll need to use the Ubuntu installer in rescue mode to mount your root partition and edit the sudoers file to add your new user account.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .