home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / expect / root / usr / bin / autopasswd / autopasswd~
Text File  |  1998-08-19  |  263b  |  12 lines

  1. #!/usr/bin/expect -f
  2. # wrapper to make passwd(1) be non-interactive
  3. # username is passed as 1st arg, passwd as 2nd
  4.  
  5. set password [lindex $argv 1]
  6. spawn passwd [lindex $argv 0]
  7. expect "password:"
  8. send "$password\r"
  9. expect "password:"
  10. send "$password\r"
  11. expect eof
  12.