0

After getting "can not write bytes : broken pipe" message and being unable to boot, I reloaded 12.04, my user name had some upper case letters in it and I was unable to log in. Maybe the password changed also. How can I log in and reset my password and user ID ?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Steve
  • 1
  • "I reloaded 12.04"? you reinstalled? "user name had some upper case letters in it and I was unable to log in." usernames in linux are all lowercase by default even if you write them in upper case. "How can I log in and reset my password and user ID?" are you looking for this – Braiam Nov 20 '13 at 01:26

1 Answers1

0

Assuming you have physical access you can boot into single user mode. In ubuntu, this is very conviniently called "recovery mode". If you lack this, go into edit mode in grub go to your user boot option and add the word single at the end

The 'proper' way to look up your username (and password, of sorts) is to look in /etc/shadow - cat /etc/shadow should spit out all that, and you'll see the usernames of all your accounts there.

You'll see something like geek:$fhgbesft7y842387ty884yg87.:16026:0:99999:7::: - First 'field' before the colon is your username, then a hash of a password (I've replaced mine with key mashing) and so on. There's a more complete writeup here.

You will then be able to change your password with passwd username as per your username on /etc/shadow