useradd and php crypt()
<p>I need your help with this frustrating problem.</p>

<p>I'm running: Debian Linux 5.0. with webmin version 1.510.</p>

<p>When I create a new user using the webmin interface and I connect to the pop3 account, everything works great. When I generate a new user using this PHP code:</p>

<pre><code>$pass = crypt("user1");
shell_exec("sudo /usr/sbin/useradd user1 -g users -c \"user one\" -s /bin/sh -p $pass");
</code></pre>

<p>The user (and ofcourse mail acct) are generated just fine. However, I cannot login to this pop3 account. Everytime I try, I get an auth error. It seems that the password I'm generating with crypt(); is not right and I can tell by looking at it, it looks very diff than the pattern of the one generated by the system.</p>
