Quote:
Originally Posted by soliberus
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]