Hi,
I need to be able to add new virtual users in pure-ftpd using PHP if possible. I've got the following problems:
When using SSH, you enter the 'pure-pw useradd' command and it asks you twice for the password so I'm not sure if it is possible to use the PHP exec command to do that (maybe I am wrong).
Another way I was thinking was to add the user to the /etc/pureftpd.passwd file but I'm not sure how to encrypt the password using PHP.
Quote:
Passwords are compatible with the hashing function used in /etc/passwd or /etc/master.passwd . They are crypto hashed with blowfish, md5, multiple-des and simple des, in this order, according to what your system has support for
|
I know how to encrypt using md5 but it doesn't seem to be using that so I'm assuming that the passwords are blowfish - is there a PHP function that I can use to encrypt using blowfish? If there is then I can just add the users to the password file using fopen.
Any help would be great so that I don't have to manually set up FTP users using SSH.
Thanks in advance.