0

I installed Ubuntu 11.10 two days back. Today I added a user named vivi and set it to administrator. And I just changed vivek, my username, to standard user. Now, since I created new user vivi, I have not supplied any password for it, yet I am unable to perform any administrator actions. Can anybody help me to restore administrative privileges?

4
  • Try this answer: askubuntu.com/questions/78248/…
    – RobinJ
    Nov 12, 2011 at 15:00
  • possible duplicate of Reset Lost Administrative(root) Password
    – Takkat
    Nov 12, 2011 at 15:10
  • I have tried to change the password of the user vivi by typing passwd vivi but it shows you cannot view/modify password for vivi. I could see from user accounts, account is disabled in password field for user vivi. I am not sure if I can recover this since admin user vivi is disabled due to no password.
    – Vivek
    Nov 12, 2011 at 15:13
  • @Takkat i tried your answer. But here scenario is different. I created an administrator user without password and it is disabled by default. Same time i accidently changed my username into standard user. Now only standard user exists and admin is disabled :(
    – Vivek
    Nov 12, 2011 at 15:18

2 Answers 2

1

Not sure if the above answer will work, since under live cd, you can't edit the system which installed too easily.

boot from the live CD, or mount the drive some other way, then edit /etc/group from your installed system. Make sure your have a line like admin:x:119:vivi - don't change the number if it's different, just add your user name at the end of the line.

You also have the option of editing the passwd file, editing the root entry so you can login, but that's probably less likely to work well

1
  • Thank You so much Sean, it worked for me. Well i found the value wa s 118 and I simply added my current username to its end and it worked fine.
    – Vivek
    Nov 13, 2011 at 6:03
0

If I understand yours problem, you have now no administrator account with password and just common user account (without admin privileges == not listed in suders (not in admin group).

Well - I thing yours only option is boot from live CD and (as root) set/change password for yours admin account (in chroot) or add his user account in admin group.

3
  • Thanks for the answer, but I am sorry i think this may not work as when we log in with live CD or usb, it doesn't allow to edit current user's account.
    – Vivek
    Nov 13, 2011 at 6:05
  • You must do it as root of course. With sudo. Then it must work.
    – kapetr
    Nov 14, 2011 at 9:22
  • The answer from Sean is exactly what I wrote - thanks Sean for more detailed explanation for Vivek. I just don't understand the "... since under live cd, you can't edit the system which installed too easily." followed by "boot from the live CD, then edit ..." ?-)
    – kapetr
    Nov 14, 2011 at 9:38

You must log in to answer this question.

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