Originally posted by petertm
I need to change 1000+ individuals passwords back to a default password.
I need an easy way to do this.
Not sure how easy
you'll think this is but this sort of problem is exactly the sort of thing that the `expect' scripting language was designed for (automating the use of interactive programs). In fact, many of Don Libes's early examples of using expect involved tasks where one was dinking around with passwords. I think an relatively short expect script invoked repeatedly within a simple shell script that reads /etc/passwd for the user account names would be the simplest. And you'd need to run this as root since your changing other user's passwords. Finally, make sure you only do this for regular users; parse /etc/passwd for, say, members of the `users' group, group numbers greater than N
, or something like that. You don't want to go changing root's password to ``ChangeMe'' and some accounts should never
have a valid password.