[Solved] passwd command not working

Hi all,

I have got a problem,
i have Solaris 8 server, where on running the passwd command, it says permission denied. I have checked /bin/passwd, /etc/passwd, /etc/shadow all have permissions as like one working server.
It is happening for root user and all other users.
i have tried replacing the /bin/passwd from some other server but it didn't work even then.
:wall:
Thanks in advance

What does this output:

grep passwd /etc/nsswitch.conf

the output is

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

This seems to be fine, i believe...

---------- Post updated at 05:26 AM ---------- Previous update was at 03:30 AM ----------

This is the only difference i can see b/w a good and a bad server

Bad server

18 drwxr-xr-x   5 root     bin         9216 Dec 29 04:51 bin/

Good server

     drwxr-xr-x   4 root     bin         9216 Sep  6 17:58 bin

Can somebody please help?

What is the long format ls output for the following files:

/bin/passwd
/etc/passwd
/etc/shadow 

what was changed immediately before 4:51 AM on Dec 29? was a new package or patch installed? when did the problem first start? if things were okay on Friday, when was the server rebooted last? if there were no changes that you folks initiated, have you looked at the disk drive for hardware issues? if disk drive is okay, look at the login logs for people who logged in outside of their normal work hours ...

you may need to look at possibly restoring from backups ...

Thanks Just ice....i have got the problem resolved.

/etc/nsswitch.conf was all fine
/etc/passwd was all fine
/etc/shadow was all fine
/usr/bin/passwd was all fine
Problem was with the permissions of
/var/adm/utmpx file, its permissions had got changed..

Provided 664 to it and it all started working fine.....I hope it will help others.

Thanks for letting us know what the solution was.