passwd <username> does not work in root

Asked by Harry

I have forgotten my ubuntu password and have followed the directions of many posts to access the root shell and type passwd <username>. I am then prompted to type my password but as soon as I touch a key (any key) i am prompted to confirm the password where it does the same thing again.

I am a total noob and installed ubuntu 8.10 using wubi if that helps.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Pravah Shukla (pravah101shukla) said :
#1

Please mention which edition of ubuntu u r using and so I will be able to help u a little bit more.
Well when ubuntu starts there comes a recovery/rescue mode
in that part u can reset the password
I am damn sure that in 7.04 it can be done and in later version LIVE CD is there which carries recovery mode which is helpful for tackling these types of problem
probably while setting up keyboard setting u have not chosen the correct layout of ur keyboard
or might be some fault in ur keyboard which has made this problem
try repairing ubuntu by recovery mode or rescue mode
Hope it helps

Revision history for this message
Pravah Shukla (pravah101shukla) said :
#2

Do tell here to all of us that which version of Ubuntu you are using

Revision history for this message
Harry (s2008979) said :
#3

Oh sorry, I am running ubuntu 8.10

Revision history for this message
Bhavani Shankar (bhavi) said :
#4

are you getting any errors?

Revision history for this message
Harry (s2008979) said :
#5

No errors are stated.

It works fine until I am prompted to enter a password. It only accepts one key stroke and immediately goes to the next prompt. If I hit the same key for the password and confirmation of the password then I receive a password successfully changed message. if I then reboot using "reboot -f" ("reboot" will not work) and attempt to log in with the single key it still will not work.

Also, if I try to run other commands after I attempt to change the password I see no text but the characters/keys are registering. Like when I am typing the password.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Reboot the system and as it comes back on (in a sense of power, not OS). Start pressing ESC repetedly. You can then select recovery mode and the system will boot a little. You will then be presented with a menu, select root console using cursors

Now you are in a single user environment logged in as the almighty root. you can then execute:

passwd <you user name that you forgot the password for>

(E.g. passwd andy)

you can then set the password for the account. Once set, execute

shutdown -r now

and the system will reboot. Let i boot as normal and log on with your new password that you set earlier

Revision history for this message
Harry (s2008979) said :
#7

actionparsnip,

That is what I am trying to do. The problems I described above happen when I am prompted for a password in the root after typing in passwd <username>

Should I consider reinstalling ubuntu?

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#8

I would boot to the prompt i described and create a new user:

adduser <new user name> admin

This will add them straight into the admin group which will give them sudo / gksudo / kdesudo access

Then reboot and try to log in as that user

If that doesnt work I would test the keyboard in the live CD environment to make sure it is not faulty (Enter key stuck etc)

Revision history for this message
Harry (s2008979) said :
#9

Thanks actionparsnip, that solved my question.