in reply to Re: change unix password with cgi-script
in thread change unix password with cgi-script

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.
  • Comment on Re^2: change unix password with cgi-script

Replies are listed 'Best First'.
Re^3: change unix password with cgi-script
by duelafn (Parson) on Jun 08, 2011 at 12:58 UTC

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

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

    Good Day,
        Dean