Results 1 to 6 of 6
Hi fellas,
new bee here,all the suggestions,ideas are more than welcome.
I have question about embedding existing mysql data to FTP.
let me tell you how the system works.
apache ...
- 01-27-2010 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 9
mysql embedding to ftp
Hi fellas,
new bee here,all the suggestions,ideas are more than welcome.
I have question about embedding existing mysql data to FTP.
let me tell you how the system works.
apache gets the user name and passwords records to the MYSQL and creates a folder per user in server.
however users can not access their created folder using FTP client software.
so how am I gonna merge the existing user/password data in MYSQL --->to the FTP user/password.
ps. vsftpd and proftpd installed already, so in whichever you feel more knowledgeable, I can go with that.
Thank you
- 01-27-2010 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
If the user/pass info in the DB is hashed, you can't "export" it. The hash is not reversible and you don't know the algorithm used by the DB to create the hash.
To use existing account info, you'll have to use an FTP server that can authenticate using the DB.
- 01-28-2010 #3Just Joined!
- Join Date
- Dec 2009
- Posts
- 9
what if it is not hashed?
how to merge existing userdata with ftp?
thank you
- 01-28-2010 #4Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
what if it is not hashed?
how to merge existing userdata with ftp?
Copy it or run it through the FTP's hash function.
- 01-28-2010 #5Just Joined!
- Join Date
- Dec 2009
- Posts
- 9
since I am new bee,
could you please give me a brief explanation.
how to copy and run with ftp hash function.
I really appreciate.
- 01-28-2010 #6Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
You probably don't know the FTP's hash function.
Script:
For each account pulled from MySQL, feed it to "adduser" on the FTP server.
Result:
Accounts from MySQL added to FTP all with same username and password.
Downside:
Password changes on one are not reflected on the other (unless some other automated script checks for change in MySQL and runs "change password" on the FTP.
** Better: FTP authenticates user via MySQL (if possible.)


Reply With Quote