Hello, I use Solaris 2.51.
I have got 7000 users, and I want to automatize the password generation with expect. But it doesn't work.
spawn passwd jgomez
set oldpass [lindex $argv 0]
set newpass [lindex $argv 1]
expect "Enter login password: "
expect "New password:"
expect "Re-enter new password:"
When I run it, it delays little time. When I change a password with passwd it delays 4 seconds, because I have a lot of accounts. But if I use the except script it delays only one second. It is as if it doesn't proccess the passwd
command. I don't understand. Can you help me?
thanks very much.