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.

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 ?

share|improve this question
    
"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 1:26
add comment

marked as duplicate by Braiam, Mitch, Warren Hill, minerz029, karel Nov 21 '13 at 5:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

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

share|improve this answer
add comment

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