yes, it does
from online manual:
(http://www.zend.com/manual/function.crypt.php)
PHP sets a constant named CRYPT_SALT_LENGTH which tells you whether a regular 2-character salt applies to your system or the longer 12-char MD5 salt is applicable.
CRYPT_MD5 - MD5 encryption with a 12-char SALT starting with $1$
i'm not sure how unix md5 passwords in shadow file is made, but they'll start with $1$
this one worked on my system:
echo "Adding user to system...";
$usrAddCmd = "adduser $new_user -d /crap/home/$new_user -g $group -p ".crypt($new_pass)." -n -s /bin/bash";
exec($usrAddCmd);
it didn't create md5 string, but allowed me to login...
Kirk Parker wrote:
Since when does crypt() do md5 and not DES? Try crypt()-ing it instead.