Code:
SQLAuthTypes Crypt
SQLAuthenticate users* groups*
SQLConnectInfo ftp@localhost bla bla
SQLUserInfo users username passwd NULL NULL homedir NULL
SQLGroupInfo groups groupname id username
SQLUserWhereClause "valid = 1"
SQLDefaultGID 100
SQLDefaultUID 500
SQLHomedirOnDemand off
RequireValidShell off
SQLLog PASS updatelogin
SQLNamedQuery updatelogin UPDATE "count=count+1, lastlogin=NOW() WHERE username = '%u'" users
### Log trafic (STOR, RETR commands)
SQLLog STOR,RETR,ERR_STOR,ERR_RETR logtrafic
SQLNamedQuery logtrafic FREEFORM "INSERT INTO history (username, filename, transfertype, transfersize, transferhost, transfertime, transferdate) VALUES('%u', '%F', '%m', %b, '%a', '%T', NOW())"
### Log user error events (ERR_* commands)
SQLLog ERR_* logevents
SQLNamedQuery logevents FREEFORM "INSERT INTO userevents (username, eventtype, description, eventdate) VALUES ('%u', '%m', '%r', NOW())"
SQLAuthenticate users* groups*
SQLConnectInfo ftp@localhost bla bla
SQLUserInfo users username passwd NULL NULL homedir NULL
SQLGroupInfo groups groupname id username
SQLUserWhereClause "valid = 1"
SQLDefaultGID 100
SQLDefaultUID 500
SQLHomedirOnDemand off
RequireValidShell off
SQLLog PASS updatelogin
SQLNamedQuery updatelogin UPDATE "count=count+1, lastlogin=NOW() WHERE username = '%u'" users
### Log trafic (STOR, RETR commands)
SQLLog STOR,RETR,ERR_STOR,ERR_RETR logtrafic
SQLNamedQuery logtrafic FREEFORM "INSERT INTO history (username, filename, transfertype, transfersize, transferhost, transfertime, transferdate) VALUES('%u', '%F', '%m', %b, '%a', '%T', NOW())"
### Log user error events (ERR_* commands)
SQLLog ERR_* logevents
SQLNamedQuery logevents FREEFORM "INSERT INTO userevents (username, eventtype, description, eventdate) VALUES ('%u', '%m', '%r', NOW())"
Wo und wie ordne ich jetzt den Nutzern aus der DB die ID's zu?