Posted on 1998-04-12
I am trying to create a sript that will change the users passwd.
At first I thought it would be as simple as calling the passwd prorgam using the user-login and new password as comand line arguments.
Realising that I could not include the passwd at comand line, my other option is to edit the /etc/shadow file directly BUT I need to use the same encryption method and/or salt formula that passwd uses to encrypt the password or else the user will not be able to login. (the clashing of the encryption methods will not allow for password matching).
wow.. talk about a run-on sentence...
The reason for this is that I need to create over 700 accounts and I would like to use a random password generator.
basically what this script does is create the account, asign the password and create a passwd.txt file in the root directory so that later I can inform the users of their initial password.