Hi luke On Tue, 10 May 2005, [EMAIL PROTECTED] wrote:
> Hi, > > I'm trying to get a script that will enter/change a user's password > > I have the following 'Expect' script: > > ~_________ doPass ________________________ > / > #!/usr/bin/expect -f > set username [lindex $argv 0] > set password [lindex $argv 1] > > spawn passwd $username > expect "New password: " > send "$password\r" > expect "Retype new password: " > send "$password\r" > send "exit\r" > expect eof > \_________________________________________ > > This works fine the first time, then times out when running consecutive times. > Does anyone know what is happening and why it times out if I run it twice or 3 > times in a row? > > any help would be appreciated, Try and see what it is doing with the expect -d option, it is suprising sometimes. > > kind regards, > Luke > > -- > ............._.. > .| .| |.|/.|_ . > .|__.|_|.|\.|_ . > :61 421 276 282: > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -------------------------------------------------- Darren Williams <dsw AT gelato.unsw.edu.au> [EMAIL PROTECTED] <www.gelato.unsw.edu.au> -------------------------------------------------- -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
