Problems changing password over ssh (Unexpected failure. Password file/table unchanged)
Posted on 2005-05-10
I am receiving an error message when attempting password changes from Cygwin/expect over ssh to Solaris. This is the error message
Unexpected failure. Password file/table unchanged.
The error message is also issued when I execute:
ssh -l myname myserver.mydomain.com passwd
I've reviewed other postings here and searched Sun's website and found reference to an issue that gives the identical error message but I believe it is unrelated. The issue that I saw is titled, "On Solaris Systems, Users May Not be Able to Change Their Password or Password Attributes Using the passwd(1) Command" which is document ID: 57592. This led me to check the configuration for passwd in the /etc/nsswitch.conf and I can see that this is a different issue because my /etc/nsswitch.conf says:
which is not consistent with what Sun is describing in their document.
I believe that the issue has something to do with using "ssh" and sending the remote passwd command on Solaris. I tried this on another system (linux) with "expect" as a proof-of-concept. I have created an "expect" script that connects to my account on my personal linux server over ssh and changes my password successfully.
1) Please help me understand why the passwd command is complaining when executed remotely?
2) Please also help me to figure out a workaround so that I can script password changes using "expect" from a password server.