* entering 2500 passwords : Part 2
@ 1999-05-07 13:12 Chris Myers
0 siblings, 0 replies; only message in thread
From: Chris Myers @ 1999-05-07 13:12 UTC (permalink / raw)
To: tru64-unix-managers
in a previous email :
>Hi,
>I am in a bind here. i need to enter 2500 passwords.
>is there anyway to do this programmatically. we are doing it with passwd,
>but this is very tedious and we will never make the deadline. (i can get
the >passwds in a txt file username,passwd)
>du 4.0e is the version.
>any help would be greatly appreciated.
>Thanks
>Chris
i forgot (i was 3:00 am when i wrote the email) to mention that i am using
c2 security.
thanks for all the answers so far. most are suggesting expect. one even
wrote a c program (Thanks)
i have an expect script but error trapping is eluding me. anyone willing to
help? i would like to run this from a perl program and if there is an error
to log the error to a file with the reason.
i would of course post the script a perl script to here when done. i
appreciate any help and the help already received.
here is the script:
#!/usr/local/bin/expect
set user [lindex $argv 0]
set password [lindex $argv 1]
spawn /bin/sh
expect "#"
send "passwd $user\r"
expect "quit):"
send "p\r"
expect "New password:"
send "$password\r"
expect {
"Re-enter new password:" { send "$password\r" }
"same password." { send_user 1 }
"characters long." exit
}
close
Thanks again
Chris
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-05-07 13:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-07 13:12 entering 2500 passwords : Part 2 Chris Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox