Question : Problems Running Expect Version 5.28.1

I was looking for a way to rotate passwords on many servers from a single main system, someone suggested using Expect with "passmass"

Setup looks real easy, so I installed expect on 2 servers for a test.

As root on serverA ran:

#passmass serverB

Passmass asked for old password, new and confirm.

Then I get the login across the screen, I see the MOTD, and I sit at a #New UNIX Password prompt.

Basically:

"serverA:/# passmass serverB
old password:
new password:
retype new password:
spawn rlogin serverB -l root
Last login: Mon Oct  4 14:10:59 1999 from serverA

'This system is for authorized business use only...yada yada yada...use of this equipment or system is strictly prohibited.'

No mail.

[root@serverB /root]# passwd
New UNIX password:"

It logs in ok, but fails to run through the password rotation properly.

For reference, RedHat 6 has SSH installed, all servers have a MOTD file on login.

Can anyone figure out what the issue might be?  I went through and tried a few flags for telent/rlogin/slogin, all the same.

Answer : Problems Running Expect Version 5.28.1

I think it doesn't like the UNIX in the prompt from passwd.  If you look at the passmass script, it's expecting "(n|N)ew password:".  If your example passwd prompt is accurate, modify your version of passmass to include UNIX in the expect pattern, i.e. "(n|N)ew UNIX password:"
Random Solutions  
 
programming4us programming4us