pureftpd-auth/README.md

47 lines
1.1 KiB
Markdown
Raw Normal View History

2015-10-22 18:50:17 +02:00
pureftpd-auth
=============
2015-10-23 10:01:45 +02:00
Ortiche pure_authd authenticator script written in perl. Based on ziokernel code.
Dependencies
---
2015-10-25 19:32:36 +01:00
apt-get install pure-ftpd libcrypt-eksblowfish-perl libclass-mix-perl libparams-classify-perl liblog-log4perl-perl dh-make-perl
2015-10-23 10:01:45 +02:00
dh-make-perl --build --cpan Crypt::Passwd::XS
dpkg -i libcrypt-passwd-xs-perl_0.601-1_amd64.deb
2015-10-25 19:32:36 +01:00
[1] https://wiki.debian.org/PerlFAQ
2015-10-23 10:01:45 +02:00
Config
---
2015-10-23 10:09:00 +02:00
echo "/usr/local/ortiche/pureftpd-auth/pureftpd-auth.pl" > /etc/pure-ftpd/conf/ExtAuth
2015-10-23 10:01:45 +02:00
echo "yes" > /etc/pure-ftpd/conf/CreateHomeDir
rm -fr /etc/pure-ftpd/auth/
ln -s /etc/pure-ftpd/conf/ExtAuth /etc/pure-ftpd/auth/ExtAuth
Auth
---
2015-10-23 10:09:00 +02:00
mkdir /usr/local/ortiche/pureftpd-auth/auth
vi /usr/local/ortiche/pureftpd-auth/auth/pureftpd.pl
2015-10-23 10:01:45 +02:00
<code>
#!/usr/bin/perl
$DB_DB="ftp_db";
$DB_HOST="localhost";
$DB_USER="ftp_user_ro";
$DB_PASS="your_password";
$DB_TABLE="ftp_table";
</code>
Running
---
2015-10-25 19:32:36 +01:00
/usr/sbin/pure-ftpd -d -A -B -4 -Z -p 50000:50601 -H -Y 1 -E -k 95 -C 5 -c 30 -lextauth:/var/run/pure-ftpd/extauth.sock -B
2015-10-23 10:01:45 +02:00
2015-10-25 19:32:36 +01:00
/usr/sbin/pure-authd -s /var/run/pure-ftpd/extauth.sock -r /usr/local/ortiche/pureftpd-auth/pureftpd-auth.pl -B
2015-10-23 10:01:45 +02:00