[ale] scripting passwd change
Joe Knapka
jknapka at earthlink.net
Wed Aug 23 17:32:39 EDT 2000
You are absolutely right. Apologies; I must proofread
my email more carefully.
-- Joe
Michelangelo Grigni wrote:
>
> pynk wrote:
> > On Tue, 22 Aug 2000, Joe Knapka wrote:
> > > #!/usr/bin/expect
> > > spawn passwd
> > > expect "ssword:"
> > > send [lindex $argv 0]
> > > expect "ssword:"
> > > send [lindex $argv 1]
> > > expect "ssword:"
> > > send [lindex $argv 1]
> > > expect eof
> >
> > I can't get this to work for some reason....
> > $ ./cpasswd.tcl
> > spawn passwd
> > Changing password for pynk
> > (current) UNIX password:
> >
> > ...and then it sits there and looks at me until it finally times out.
>
> That script is not sending the \r (return key) at the end
> of each password. Something like this should help:
>
> expect "ssword:"
> send [lindex $argv 0]\r
> expect "ssword:"
> send [lindex $argv 1]\r
> expect "ssword:"
> send [lindex $argv 1]\r
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
*** Joseph Knapka ***
In any formula, constants (especially those obtained from handbooks)
are to be treated as variables.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list