Pure-ftpd has the option to create your own authentication module, however it requires runtime work to get it up:
Now, we have to run pure-authd and pure-ftpd, to connect them through a
local socket and to tell pure-ftpd to use our external authentication module:
pure-authd -s /var/run/ftpd.sock -r /usr/bin/ftp-auth-handler &
pure-ftpd -lextauth:/var/run/ftpd.sock &
That's all. Now, we can only log in as 'john', as all FTP authentication is
done by the shell script.
Is there a way to accomplish these two commands in the configuration?
I had the same problem yesterday and solved it like this: As far as I found out you can't put "pure-authd -s /var/run/ftpd.sock -r /usr/bin/ftp-auth-handler &" into the config file, maybe edit pure-ftpd-wrapper to start/stop it with pure-ftpd...
For the parameter "-lextauth:/var/run/ftpd.sock", on debian: create the file /etc/pure-ftpd/conf/ExtAuth with the path to the socket as the content (e.g. /var/run/ftpd.sock) then, go to /etc/pure-ftpd/auth and create a sym-link named ExtAuth to the just created conf/ExtAuth file: ln -s /etc/pure-ftpd/auth/ExtAuth /etc/pure-ftpd/conf/ExtAuth
that isn't exactly what you wanted to know, but at least you can use the init.d script to start/stop pure-ftpd... (and start pure-authd yourself)