0

I have lost the admin password. Tried the procedure in the detailed thread How do I reset a lost administrative password? but I keep having the same answer. After entering the new UNIX password and retyping it is saying "Authentication token manipulation error" and then "password unchanged" What should I do? thanks

  • Did you maybe miss the mount -rw -o remount / step? – steeldriver Feb 4 '16 at 12:01
0

I DO NOT TAKE CREDIT FOR THIS ANSWER

From https://askubuntu.com/a/84697/448562:

If Jorge's method didn't work for you, as it didn't for me, here is another method. I had to try something different because:

  1. My USB keyboard did not work at the root prompt ⋯ probably hardware either keyboard or mainboard. To fix I used an old PS/2 keyboard (the little round plug) and use that.

  2. When I used passwd username to change my password, it failed because of a bad token or such. This called for drastic measures.

The Drastic Measures

This is a very dangerous thing to do! Jorge's method should be used; only do this in case that method doesn't work.

Do this at your own risk. It did work for me on my 11.10 system.

The idea is to set the user's password to blank (or null) - this allows you to just press Enter at the Password: prompt.

Still at the root prompt from Jorge's method, first remount the root file system as read-write by using this command:

mount -o remount,rw /
  • Now you are a super-user on this system. Tread lightly.

Then edit the password shadow file to remove the encrypted password for your username. Type in:

nano -B /etc/shadow

The nano editor will display the contents of the file. Each line will have the form name:⋯:⋯:⋯… where ⋯ is a string or null (empty). One of the lines will start with your username. The first ⋯ after your username is your encrypted password. As an example:

username:$1$amFeNcjp$PprjCKEVk3UtzKwWfEMOY0:14920:0:99999:7:::

where $1$amFeNcjp$PprjCKEVk3UtzKwWfEMOY0 is the encrypted password.

Carefully delete the encrypted password leaving the all the ":"s, so it looks like this:

username::14920:0:99999:7:::

Then type Ctrl+O, press the Enter key to save, then Ctrl+X to close nano.

Reboot and you will have an empty (or null) password. Be sure to use passwd username in a terminal to set or reset your user password.

Source for PS/2 workaround was here.

Sources for the drastic measures were here and here.

Note on nano ― the -B option makes a backup of the original edited file, same name with a "~" appended.

  • it did not work but I found out that if i run the GRUB first from the main Menu I can get read-write privileges – simone Feb 4 '16 at 20:02
  • thanks to everyone. i will now try to install skype. I guess I will ask again fo rhelp – simone Feb 4 '16 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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