I was trying to upgrade my 2nd computer's hard drive, and in the process, I un-admin'd and disabled my account. I'm using the guest account right now. I've tried everything that ask ubuntu has to offer (or at least after 5 hours of searching, trying, and failing) i.e., creating a new account (didn't allow me to do it), usermod, passwd, anything involving sudo, hell, I can't even get into recovery mode with the left shift thing... I really want to get into my account. Please help me.
Asked
Active
Viewed 1,194 times
0
-
2What exactly did you already tried?. – Uri Herrera Aug 13 '12 at 05:30
-
Have you tried login in text mode? When on graphic login screen, type Ctrl+alt+F1, then try to login. – Marc M Aug 13 '12 at 08:26
1 Answers
0
Adding Users To Admin / Sudo Group Using Recovery Mode
First shutdown your computer, then 'restart whilst holding shift' on the keyboard to load grub menu.
Select 'recovery mode' from the grub menu.
Select 'drop to root shell' from the recovery menu.
Remount the drive with write permission using mount -o rw,remount /
Now type adduser username sudo
replacing username with your user name ie. 'adduser phil sudo'
You should now see a message saying 'adding user' followed by 'done'.
Type shutdown -r now
to restart the computer.

Fernhill Linux Project
- 3,899
-
Tried, didn't work. I can't get into recovery mode. My problem isn't as much the sudo thing, it's that my account is deactivated, and the only way I can use the computer is the guest session. I need the admin password to reactivate my account, but the admin password is deactivated with my profile. – Cormac Aug 13 '12 at 16:06
-
Ok, if you can't get to recovery mode, have a look at this guide & video on my website on adding your username to admin using a live disc - please note that you will need to add your username to sudo in Ubuntu 12.04, admin is for 11.10 and earlier. Let me know if it works so I can edit my answer to include the details. Also just to double check did you remove the password from the admin account? http://fernhilllinuxproject.com/guidesandhowtos/deletedadmin.html – Fernhill Linux Project Aug 13 '12 at 16:32
-
The problem is that I disabled my account, so I can't login, and I can't re-enable it, because it doesn't let me use the admin password, because the admin account has been disabled. What I really need to know is how to re-enale an account from the outside, w/o the admin password. – Cormac Aug 13 '12 at 21:01
-
1You will either have to use the live disc as suggested in the comment, or use recovery mode. I think Fernhill Linux Project understands the situation. From recovery mode you are in a sudo state so you can do anything. That's the easiest way to solve the problem. From the live CD you can get to the file system on your system and manipulate it. – John S Gruber Aug 14 '12 at 04:55
-