you use "expect" ----------------------------------------- #!/usr/bin/expect -f set user devuser set password PASSWORD
spawn passwd
expect "user name:" send "$user\r"
expect "password:" send "$password\r"
--------------------------------------
Home Page :http://expect.nist.gov/ Exmaple :http://expect.nist.gov/example/mkpasswd.man.html http://expect.nist.gov/example/passmass.man.html
On Fri, 11 Apr 2003, Srinivas wrote:
using passwd command how can i pass password argument? Exactly I want like this in normal user: Command -u <user> -op <old password> -np <new passwpod>