From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079042215555.tru64-unix-managers.marc@archive.invalid> From: Chris Myers Date: Fri, 07 May 1999 13:12:31 +0000 To: tru64-unix-managers Subject: entering 2500 passwords : Part 2 X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079042215555 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