tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Chris Myers <cmyers () kiski ! net>
To: tru64-unix-managers
Subject: entering 2500 passwords : Part 2
Date: Fri, 07 May 1999 13:12:31 +0000	[thread overview]
Message-ID: <96079042215555.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~1999-05-07 13:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox