Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    9

    Cool 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

  2. #2
    Linux 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.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    9
    what if it is not hashed?
    how to merge existing userdata with ftp?
    thank you

  4. #4
    Linux 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.

  5. #5
    Just 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.

  6. #6
    Linux 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.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...