Change password - User does not exist

When trying to change the password with the command "passwd" it returns that the user does not exist.

passwd <USER>
passwd: changing password for <USER>
passwd: <USER> does not exist

This is a Solaris 2.5.1 system.

try

passwd username

if it is still returning users does not exits, check the /etc/passwd and make sure that user really exits

Note
username is the username of the person you intend to change the password for

The username does exist. The problem happens when the user logs in and try to change its password through the command passwd.

Here is a better description of what happens :

% passwd username
passwd: changing password for username
passwd: username does not exist

What do you get from:

grep passwd /etc/nsswitch.conf

I get :

% grep passwd /etc/nsswitch.conf
passwd: files

Additional information : The password is changed normally if the "passwd" command is run by root (through "su root" or "su root --". It is confirmed that the problem occurs when "passwd" command is run by the user itself. It also occurs to all users of the system, even after the user is created via admintool.

i dont know why but i had this issue befor also.

just supply the username you want to change the passwd with. even if it is the current user.

never bothered to dig any deeper into it.

ryamada, the permissions on your copy of passwd (the program, not the data file) are wrong. To fix it, do the following as root:
cd /usr/bin
chown root:sys passwd
chmod 6555 passwd

Thanks Perderabo. It worked.

The permissions are set as follows:

-r-sr-sr-x 3 root sys 15760 Sep 10 15:45 nispasswd
-r-sr-sr-x 3 root sys 15760 Sep 10 15:45 passwd
-r-sr-sr-x 3 root sys 15760 Sep 10 15:45 yppasswd