If you use 'expect' then below between the "--CUT HERE--" markers is an expect script called "passwdreset" which was developed on HP-UX but may well work on other UNIX'es (the text of some of the prompts might need to be altered slightly though). Download expect for your OS at: http://expect.nist.gov Copy the script into a file called "passwdreset", make it executable and run as follows: ./passwdreset username password So, for example, say that you want to reset the password for user "daves" to "hello1" then type: ./passwdreset daves hello1 The above command can be used in a script and even via a cronjob. Here is the script: ------------------ CUT HERE ----------------------- #!/usr/local/bin/expect -- # # @(#) passwdreset, version 002, 12-May-1999 # set progname $argv0 if {$argc != 2} { puts "$progname: invalid arguments" exit 2 } set usernam [lindex $argv 0] set newpass [lindex $argv 1] spawn passwd $usernam expect { "New password:" { # } timeout { puts "$progname: timeout waiting for new password prompt" exit 2 } eof { puts "$progname: eof waiting for new password prompt" exit 2 } } send "$newpass\r" expect { "Re-enter new password:" { # } "Re-enter new password:" { # } timeout { puts "$progname: timeout waiting for re-enter password prompt" exit 2 } eof { puts "$progname: eof waiting for re-enter password prompt" exit 2 } } send "$newpass\r" expect { eof { # } timeout { puts "$progname: timeout waiting for eof" exit 2 } } exit 0 ------------------ CUT HERE -----------------------