in reply to change unix password with cgi-script

Personally, I would have nightmares knowing to have such a this program out in the wild...

Some suggestions if you cannot resign this task...

Good luck.

Replies are listed 'Best First'.
Re^2: change unix password with cgi-script
by miggel15 (Initiate) on Jun 08, 2011 at 05:10 UTC
    You can believe me that I would really prefer to use the operating system tools for changing passwords but I didn't figure out how to use them (I have passwd without --stdin or something else)! This script will be run in our intranet, not on the internet! But of course, I have planned to implement a password validation (for problems like ".*"). Thanks for the hint to work with a shadow.temp file. This makes this a bit saver than it is designed now.

      This should handle the mechanics of updating the shadow file for you:

      system "/usr/sbin/usermod" => "--password", $cryptedShadowString, $benutzername;

      Good Day,
          Dean