这是我原来改的自动改密码的脚本
引用:#!/usr/bin/expect
spawn /usr/sbin/smbldap-passwd [lindex $argv 0]
set password [lindex $argv 1]
expect "*password:"
#sleep .1
send "$password\n"
expect "*password:"
send "$password\n"
expect eof
引用:#!/usr/bin/expect
spawn /usr/sbin/smbldap-passwd [lindex $argv 0]
set password [lindex $argv 1]
expect "*password:"
#sleep .1
send "$password\n"
expect "*password:"
send "$password\n"
expect eof
shell2010 于 2008-08-10 15:17:50发表:
thank you very much:0)1
lyq617617 于 2008-08-09 21:35:32发表:
拷贝下来学习一下.
谢谢分享