Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My problem is that I changed my username and computer name in ubuntu 12.04, when I restarted, the machine does not recognize my password, but it did recognize the new names user and computer.

When I started as guest session I get the name of (Pc) as administrator, but I can't seem to login with my old account.

I will be very grateful for your help.

share|improve this question
add comment

1 Answer

Live CDs are magic!

Ok, seriously. I've had this happen to me before, and I was able to use a Live CD to get it fixed.

  1. Boot from an Ubuntu live CD.
  2. Mount your Ubuntu partition by clicking on it in the Dash. (It will appear somewhere in /media; we'll find exactly where in a second.)
  3. Open a terminal with Ctrl+Alt+T.
  4. Here's the cool part: type sudo chroot /media/ubuntu/, and hit Tab to fill in the really long folder that is your Ubuntu partition. Hit Enter. Now (in the Terminal session) you are root, but in your regular Ubuntu install, not the Live CD!
  5. Now type passwd USERNAME, replacing USERNAME with your username (NOT your actual display name).
  6. You should be prompted for a new password. Enter it twice; you won't see it being typed.
  7. Close the terminal and reboot. You should be ready to go - I told you Live CDs are magic!
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.