good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Changing passwords using Expect.pm through ssh on a large number (75) of systemsby ferrency (Deacon) |
on Jul 11, 2002 at 18:55 UTC ( [id://181110]=note: print w/replies, xml ) | Need Help?? |
This doesn't answer your question, but it might solve your problem: You might want to see if your system has a chpass or pw command. chpass lets you change an account's password by specifying an encrypted password on the command line, which would alleviate your need for passwd completely. However, because the encrypted password is specified on the command line, be aware that it may show up on your system's process list. It may not be a good idea to do this on a system with untrusted users, if those users are allowed to get info about processes they don't own. In this case, your method would be better, but unfortunately I don't have enough experience with the Expect module to help you very much :) Alan
In Section
Seekers of Perl Wisdom
|
|