Topic: PHP script to create passwords

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:

I'm trying to write a PHP script that creates new passwords, but I can't determine how the passwords are actually encrypted.  It looks like Crypt is being used, with salts, but I can't find the salts.  Could you provide the parameters for the password encryption process, so that I might replicate it in PHP?

Thank you.


Re: PHP script to create passwords

If you look in the iredmail tools folder, there's a bunch of scripts for creating users and that, it appears to use openssl to encrypt the password

CRYPT_PASSWD="$(openssl passwd -1 ${username})"