Ubuntu doesn't recognise my password after upgrading from 11.04 to 11.10

Asked by Simon Morgan

I am a new user and had been using Ubuntu successfully on my Dell Inspiron 1525 for one week, until I was prompted to upgrade to 11.10. At first the upgrade seemed to have been successful, but I followed some advice to change my password to make it stronger. Since then I have been unable to log in to my user account using the new password (or the old one!).

Following advice on other similar threads I have opened the recovery console and dropped to root shell prompt.
I was unable to change the password again with "passwd username", receiving the message "Authentication token manipulation error".
I was also unable to delete the new password with "passwd -d", receiving the message "cannot lock /etc/shadow; try again later.".
Using the command "ls /etc" I cannot see any files with the suffix ".lock", and trying "rm etc/shadow.lock" brings up "cannot remove 'etc/shadow.lock': No such file or directory". There do appear to be files such as shadow-, group-, gshadow- and passwd-, as well as the same file names but without the trailing hyphen.

Any ideas on what I should try next? Apologies if it's obvious, but I am very new to Ubuntu.

Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu shadow Edit question
Assignee:
No assignee Edit question
Solved by:
Simon Morgan
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
Simon Morgan (s-f-morgan) said :
#2

Thank you for the response, Andrew, but I believe I have already carried out all the steps suggested in the www.psychocats.net web page - the steps I took were described in my original posting (see above). I am unable to change the password with "passwd username", receiving the message "Authentication token manipulation error", and the psychocats web page doesn't deal with this.

I can't see anything else in the suggested web page that is helpful for my circumstances. If there is anything I have missed please let me know.

For the time being the problem remains unresolved.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#3

You need to replace "username" with your actual username. If you don't know your username...that's what "ls /home" is for.

If that still doesn't work, then try https://help.ubuntu.com/community/LostPassword#The_Other_Way. (If you find those directions confusing, then after it says "Your system will boot up to a passwordless root shell," you can start following the instructions at http://www.psychocats.net/ubuntu/resetpassword.)

If that doesn't work, then in your Ubuntu system, open a Terminal window (Applications > Accessories > Terminal) and enter this command exactly (you can copy and paste it)

mount | grep ' on / '

and press enter to run that command. You should see something like:

/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)

The part you're interested is the device name before "on" (in this example, it's /dev/sda1). Remember that, or write it down.

Now boot the computer from an Ubuntu Desktop Install CD (you can burn the .iso image to a CD or DVD, or write it to a USB flash drive and boot from that) and select Try Ubuntu. When the desktop comes up, run the Terminal and, in the Terminal window, run:

sudo mount /dev/sda1 /mnt

If the device name was different from /dev/sda1, put what you saw instead. Then run the commands:

sudo chroot /mnt
passwd USERNAME

Replace USERNAME with your actual username. This will enable you to type in a new password. Enter your new password twice, as it requests. It's OK that no placeholders characters (like *) appear while you're entering your password.

Then run these three commands:

exit
sudo umount /mnt
exit

The last of those commands quits the Terminal window. Reboot the system by clicking the power icon on the upper-right corner of the screen and clicking Restart. Make sure to remove the CD before the system boots up again, so that you can get into your Ubuntu system on the hard disk. Now that you've reset your password, you should be able to authenticate when necessary.

If that doesn't work, then select all the text in the Terminal window (Edit > Select All), copy it to the clipboard (Edit > Copy), and paste it here. (You should be able to access Launchpad from the live CD/DVD/USB to do this).

Revision history for this message
Simon Morgan (s-f-morgan) said :
#4

Thanks for the suggestions, Eliah, and apologies for forgetting to respond at the time. I did try these, but none of them worked on their own, but would definitely be worth trying if anyone else had this problem. If I recall correctly, the way I fixed it was to select an option to remount the drive from a top-level shell menu (I expect my terminology is all wrong, I'm not an expert).

Thanks again for taking the time to respond.

Revision history for this message
Rita Maru (ritasuzuki) said :
#5

Simon,

Would you mind sharing your way of fixing the issue in detail?
I'm just an end user and I have no technical terminology.
If you could give me an instruction like Eliah (step by step) would be greatly appreciated.
Thanks,

Revision history for this message
Simon Morgan (s-f-morgan) said :
#6

Hi Rita

Thanks for the question, but I'm not sure whether I'm going to be able to help you. I don't remember the exact detail of what I did as it was several months ago, but I do recall that in the end it was quite a simple matter of choosing an option from a menu to remount the drive, and then I was back in. Since then I've never had the problem again, and not had to delve into these areas, so I still have no expertise in the terminology unfortunately.

It might be worth following the advice in http://www.psychocats.net/ubuntu/resetpassword and if you get an option in the boot menu or in the recovery menu to remount the drive, try that (at your own risk!). In my case, if I recall correctly, none of the terminal window commands seemed to solve my problem, but they might be worth a try, as it's possible that my solution was a cumulative effect of carrying out the terminal commands followed by going in again through the boot and recovery menus.

Sorry for the lack of step-by-step instructions, but good luck anyway!

Simon

Revision history for this message
Simon Morgan (s-f-morgan) said :
#7

Hi Rita

Thanks for the question, but I'm not sure whether I'm going to be able to help you.  I don't remember the exact detail of what I did as it was several months ago, but I do recall that in the end it was quite a simple matter of choosing an option from a menu to remount the drive, and then I was back in.  Since then I've never had the problem again, and not had to delve into these areas, so I still have no expertise in the terminology unfortunately.

It might be worth following the advice in http://www.psychocats.net/ubuntu/resetpassword and if you get an option in the boot menu or in the recovery menu to remount the drive, try that (at your own risk!).  In my case, if I recall correctly, none of the terminal window commands seemed to solve my problem, but they might be worth a try, as it's possible that my solution was a cumulative effect of carrying out the terminal commands followed by going in again through the boot and recovery menus.

Sorry for the lack of step-by-step instructions, but good luck anyway!

Simon

________________________________
 From: Rita Maru <email address hidden>
To: <email address hidden>
Sent: Sunday, 1 July 2012, 12:16
Subject: Re: [Question #174969]: Ubuntu doesn't recognise my password after upgrading from 11.04 to 11.10

Your question #174969 on shadow in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/shadow/+question/174969

Rita Suzuki posted a new comment:
Simon,

Would  you mind sharing your way of fixing the issue in detail?
I'm just an end user and I have no technical terminology.
If you could give me an instruction like Eliah (step by step) would be greatly appreciated.
Thanks,

--
You received this question notification because you asked the question.

Revision history for this message
Rita Maru (ritasuzuki) said :
#8

Hi Simon,

Thank you so much for taking your time to get back to me. I can't even remember what I did a week ago to get out of PC problems. My mind would be completely blank for things I did several months ago. : ) Nevertheless, you gave me a good tips. None of the terminal commands worked for me either. I will check out the link you provided.

Thanks again.

Rita