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.

I am logging in to my Ubuntu Server using my username. Once I am logged in I am typing passwd command. Entering a new password but a second after getting following error messages:

passwd: Authentication token manipulation error
passwd: password unchanged

What is wrong here? How can I change my password otherwise if I don't have access to that server physically, i.e. I am connecting remotely with ssh using terminal.

share|improve this question
2  
The first prompt asks for your CURRENT password. Have you done that, cause if you just typed the new one, you'll get the error message you say.. –  Pavlos G. Aug 18 '11 at 14:03
    
i have the same problem, and find the answer from this link help.ubuntu.com/community/LostPassword blog.imammubin.com/reset-ubuntu-passwd/2014/07/07 try this code: mount -rw -o remount / hope this helpfull.. –  Mubin Jul 7 at 4:50

7 Answers 7

up vote 14 down vote accepted

If you insert the wrong passwd

$ passwd
Changing password for rinzwind.
(current) UNIX password: 
passwd: Authentication token manipulation error
passwd: password unchanged

you get this error. If you are sure to have inserted the correct one this error might also show up if you are using shadowed password files and the shadow doesn’t have entry for this user (basically/etc/passwd has an entry for this user, but /etc/shadow does not).

In order to fix this, you can either add the entry manually (make a backup first!!!) or recreate the shadow file with pwconv (Manpage).

share|improve this answer
    
+1 my passwd/shadow set up was all messed up. Your pwconv hint was a lifesaver! –  djhaskin987 Aug 12 at 13:55
1  
@djhaskin987 3 years later (minus 6 days). Glad it helped you :D –  Rinzwind Aug 12 at 14:14

Do this two things just to make sure:

mount -o remount,rw /

This first part remounts the root partition as Read/Write since it was only in Read mode. It actually dismounts the root and the mounts it again but R/W.

Then do this

chmod 640 /etc/shadow

Then do the sudo passwd USER. It should work after that. This part gives the correct permissions to the shadow file.

share|improve this answer
    
This worked for me. Could anyone help me understand what I just did? –  Stew Apr 25 at 17:33
1  
@Stew updated answer to explain better. –  Luis Alvarado Apr 25 at 17:35
    
Great, thanks Luis! Should I change the root directory back to Read mode when I finish with this? –  Stew Apr 25 at 17:58
1  
@Stew no. It should stay like Read/Write. This is only when you want to fsck the disk for some problems not booting correctly or other issues. By default Ubuntu Server/Desktop should boot with root in Read/Write mode. So this method should not be needed after the problem (any that caused the issue) was solved. –  Luis Alvarado Apr 25 at 20:43

I'm not sure how it happened. A sudo user created my account then deleted it then created it again.

Here is what I found

mount -o remount,rw /
passwd
passwd: Authentication token manipulation error

No change.

sudo pwck

Showed no errors.

sudo grpck

Showed no errors.

ls -l /etc/passwd /etc/group /etc/shadow /etc/shadow-
-rw-r--r-- 1 root root    767 May  7 16:45 /etc/group
-rw-r--r-- 1 root root   1380 May  7 16:45 /etc/passwd
-rw-r----- 1 root shadow 1025 May  8 09:11 /etc/shadow
-rw------- 1 root root   1025 May  7 16:46 /etc/shadow-

Looks normal.

sudo cat /etc/shadow |grep oracle
oracle:$6$FsPqyplr$DrIvjFDSx0ipHmECMw1AU5hTrbNMnnkGRdFlaQcM.p3Rdu2OLjY20tzUTW61HlFH16cal56rKlLuW4j2mK9D.:15833:0:99999:7:::

Showed user and encrypted password.

sudo cat /etc/shadow- |grep oracle

Showed nothing. Not sure what that means but doesn't look right.

sudo passwd -d oracle
passwd

So the solution was to delete the password then reset new password.

Hope this helps.

share|improve this answer

Also, ensure that your entry in /etc/passwd is not mal-formed. If you have the incorrect number of colons in the line for your user entry, the 'passwd' command cannot parse it and refuses to continue with the exact error message provided.

share|improve this answer

Another problem might be that the disk is full. I got this error when resetting a password, and later checked my disks with df and found that no space is available on my disk. After freeing some I could reset the password without problems.

share|improve this answer

If you are using SELinux, running this command fixed the issue for me.

restorecon -v /etc/shadow

Thanks to this conversation for the solution.

share|improve this answer

Check if you have messed up the common-password file in /etc/pam.d/. This will cause errors if your present password does not match the one that common-password wants. In my case this was the reason why I was getting that authentication token error.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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