passwd: Permission denied

So, the other day, I encountered the following error while attempting to update the user administrator password and also when attempting to add a new user named Tom.


root@zmatech:~# passwd administrator
passwd: Permission denied
passwd: password unchanged
root@zmatech:~#

root@zmatech:~# adduser tom
Adding user `tom' ...
Adding new group `tom' (1002) ...
Adding new user `tom' (1002) with group `tom' ...
Creating home directory `/home/tom' ...
Copying files from `/etc/skel' ...
passwd: Permission denied
passwd: password unchanged
Try again? [y/N]

I resolved this by doing the following:

  1. Open the file /etc/pam.d/common-password
    # vi /etc/pam.d/common-password

  2. Look for the following line:
    password   [success=2 default=ignore]  pam_unix.so obscure sha512

  3. Now, if your entry look exactly like mine, then change success=2 to success=1 then save the file. If you see success=3, then change it to success=2 and save your file.

    That's it, now you should be able to change a password and add new user.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

©2024 ZMATECH: Innovative solutions for your IT challenges.

Log in with your credentials

Forgot your details?