Solved Pure-ftpd cannot create mysql user

Hello,

I just finished installed /ftp/pure-ftpd and set the following in my /etc/pureftpd-mysql.conf file
Code:
MYSQLCrypt  scrypt
I am now trying to create my MySQL user by running the following command:
Code:
INSERT INTO `ftpd` (`User`, `status`, `Password`, `Uid`, `Gid`, `Dir`, `ULBandwidth`, `DLBandwidth`, `comment`, `ipaccess`, `QuotaSize`, `QuotaFiles`) VALUES ('exampleuser', '1', scrypt('secret'), '2001', '2001', '/home/www.example.com', '100', '100', '', '*', '50', '0');
and I get the error
Code:
ERROR 1305 (42000): FUNCTION pureftpd.scrypt does not exist

So the question is.. how to scrypt to store my password when creating my user?

Thank you
 
I did more research into this and it look like crypt is better than MD5,
So, I could change my /etc/pureftpd-mysql.conf from
Code:
MYSQLCrypt  scrypt
to
Code:
MYSQLCrypt  crypt
and run
Code:
INSERT INTO `ftpd` (`User`, `status`, `Password`, `Uid`, `Gid`, `Dir`, `ULBandwidth`, `DLBandwidth`, `comment`, `ipaccess`, `QuotaSize`, `QuotaFiles`) VALUES ('exampleuser', '1', ENCRYPT('secret','salt'), '2001', '2001', '/home/www.example.com', '100', '100', '', '*', '50', '0');

Could someone please confirm that I got that right?
Can I can still use
Code:
MYSQLCrypt  scrypt
and create the user in the same way as mentioned above?
 
Back
Top