Vsftpd с sqlite3 в качестве PAM

642
Chainsaw Daniel

Длинная версия
У меня на сервере Raspberry Pi настроен сервер vsftpd (работает под управлением Raspbian GNU / Linux 7, разновидности Debian Wheezy). Я хотел бы настроить учетные записи, используя PAM. Если возможно, я бы использовал sqlite3, поскольку он очень маленький и не заполнил бы хранилище на моем Raspberry Pi в отличие от MySql. Я нашел библиотеку PAM для sqlite3 на github, но не знаю, как настроить ее для работы с моим сервером vsftpd.

Я слышал об использовании команды, которая поставляется с Apache под названием htpasswd, но у меня не установлено Apache, так как я использую Apache Tomcat 7 в своем домашнем каталоге, и, похоже, он не включает htpasswd.

Короткая версия
Как я могу получить пользователей на своем сервере vsftpd, не используя более 50 МБ или создавая пользователей, которые могут войти в SSH?

- Даниэль

0
поиск виртуальных пользователей, в зависимости от того, сколько вы хотите, вам может не понадобиться БД для этого. пример http://howto.gumph.org/content/setup-virtual-users-and-directories-in-vsftpd/ Dennis Nolte 9 лет назад 0

1 ответ на вопрос

0
Chainsaw Daniel

I fixed my problem by installing Apache2 but disabling it by doing the command:
sudo update-rc.d apache2 disable
That I found in the second answer here and you can read more about that command in this answer. So that Apache 2 doesn't start up automatically since I use Apache Tomcat 7.
Then I followed the tutorial found here on setting up virtual users using htpasswd.

Also since I wanted to use SSL I added the following lines to the vsftpd.conf file:

# SSL ssl_enable=YES # this selects the cipher type ssl_ciphers=HIGH # choose according to your preference force_local_data_ssl=YES # choose according to your preference force_local_logins_ssl=YES # enable this if you enable ssl. ssl_tlsv1=YES ssl_sslv2=YES ssl_sslv3=YES # give the correct path to your currently generated *.pem file rsa_cert_file=/etc/vsftpd/vsftpd.pem pasv_enable=YES pasv_min_port=12000 pasv_max_port=12100 # Some mobile clients require this require_ssl_reuse=NO

Just replace /etc/vsftpd/vsftpd.pem in the line rsa_cert_file=/etc/vsftpd/vsftpd.pem with the path to your ssl certificate. I can't remember the link I used to generate my ssl certificate but I think I used a command similar to the one found in this tutorial.

Похожие вопросы