chipperMDW
Programmer
I've been asked to write a program that allows a user with the proper permissions to change a group of users' passwords to a default temporary password (e.g. when a bunch of students return to school and have all forgotten their passwords). It needs to be able to do them all in one quick sweep, i.e. something like this:
[tt]users: bob dave sally dolly
new password: [/tt](something simple)[tt]
confirm password: [/tt](repeat)[tt]
bob's password was changed successfully.
dave's password was changed successfully.
sally's password was changed successfully.
dolly's password was changed successfully.[/tt]
The problem is that if I were to use the passwd utility, it would, of course, prompt for each user, and I don't want that. Are there any other lower-level password-changing utilities I could use instead? Is there a way to somehow generate the input for passwd? Anyone have any other suggestions?
Thanks,
Michael
[tt]users: bob dave sally dolly
new password: [/tt](something simple)[tt]
confirm password: [/tt](repeat)[tt]
bob's password was changed successfully.
dave's password was changed successfully.
sally's password was changed successfully.
dolly's password was changed successfully.[/tt]
The problem is that if I were to use the passwd utility, it would, of course, prompt for each user, and I don't want that. Are there any other lower-level password-changing utilities I could use instead? Is there a way to somehow generate the input for passwd? Anyone have any other suggestions?
Thanks,
Michael