Operating System - Linux
1827818 Members
1649 Online
109969 Solutions
New Discussion

uNABLE TO CHANGE USERPASSWD IN LINUX

 
Vipin_1
New Member

uNABLE TO CHANGE USERPASSWD IN LINUX

Hi,
I am unable to change the passwd of my account in a linux system while using my own accnt name and passwd but i can do so if i log in as root.
Can anybody help me?

thanks in advance,
Vipin.
3 REPLIES 3
Kodjo Agbenu
Honored Contributor

Re: uNABLE TO CHANGE USERPASSWD IN LINUX

Hello,

What Linux distribution are you using ? What error message do you receive when trying to change password ?

Without further information, I can just give you 2 tips :

=> Are you sure the password you try to set is conform to the default password choice rules ? Try 8-character password, with at least 2 numerical digits.

=> Are you sure a non-root user is allowed its own password ? Check /etc/shadow for password expiration rules. I don't know the exact syntax, but I can recommend you the manpage (man 5 shadow).

Good luck.

Kodjo
Learn and explain...
U.SivaKumar_2
Honored Contributor

Re: uNABLE TO CHANGE USERPASSWD IN LINUX

hi,
check the permissions of /usr/bin/passwd executable
ll /usr/bin/passwd
the output should be
r-sr-xr-x root bin passwd
if the s is not there you will face the problem
which you have mentioned.
if it is not there do this
log in as root
#chmod +s /usr/bin/passwd
try again to log in as that user and change it's password.
regards,
U.SivaKumar
Innovations are made when conventions are broken
Mark Fenton
Esteemed Contributor

Re: uNABLE TO CHANGE USERPASSWD IN LINUX

Might need to look at your pam configuration also.

Should look something like:

$ cat /etc/pam.d/passwd
#%PAM-1.0
auth required /lib/security/pam_stack.so service=system-auth
account required /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth

I think that U. SivaKumar is probably on the right track though, as Root can execute passwd, but a normal user can't (have you tested whether it is only the one account vs all non-root accounts that experience this behavior?).

Best regards
Mark