The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-11-2008
mhm4 mhm4 is offline
Registered User
 

Join Date: Jul 2005
Location: Chicago, IL
Posts: 86
Quote:
Originally Posted by soliberus View Post
Thanks for the response

I've now written a script that replaces the appropriate lines in /etc/shadow and it works fine.
I use expect:
#!/opt/bin/expect --

set password [lindex $argv 1]
spawn /bin/passwd [lindex $argv 0]
expect "Password:"
send "$password\r"
expect "Password:"
send "$password\r"
expect eof
set status [wait]
exit [lindex $status 3]
Reply With Quote