Tech Support > Operating Systems > Linux / Variants > vsftp and pam...
vsftp and pam...
Posted by krilledrille on November 12th, 2003


Hi there

I'm a newbie, please don't be offended by not-so-smart questions...

I was (like many others) following the installation instructions on
ftp://vsftpd.beasts.org/users/cevans...L_USERS/README
in order to get virtual users to work. I use

RH 9
vsftpd 1.2.0
Berkeley db 4.1.25

Once I am through the procedure and try to ftp, I can't login with a
virtual user nor with a local user! I get in both cases a "530 Login
incorrect". Checking in the /var/log/messages I see the entry "Nov 11
18:11:19 linuxbox pam_userdb[19957]: user_lookup: could not open
database `/etc/vsftpd_login.db'"
Is it a compatibility problem? What versions should i use then?

What I would like to have is that local users plus virtual users can
login!

Does anyone know a way how to do it? Help is greatly appreciated!

krilledrille



Posted by Remigiusz Boguszewicz on December 12th, 2003


"krilledrille" <krilledrille@gmx.net> wrote in message news:<3fb27bc9$1_3@news.bluewin.ch>...
Hi,

you are using PAM and pam_userdb (I suggest reading something abaut
PAM in general to understand the concept).

The process of authenticating a user is described in /etc/pam.d/ftp

It seams that you are using pam_userdb which allows you to
authenticate a user against a custom database.

In my configuration it looks like:

auth required pam_listfile.so item=user sense=deny
file=/etc/ftpusers
onerr=succeed
auth requisite pam_userdb.so icase debug db=/etc/vsftpd
account requisite pam_userdb.so icase debug db=/etc/vsftpd

The trick is to create proper /etc/vsftpd which is in fact
/etc/vsftpd.db

If I want for example user: john with password: blabla to be able to
login to our ftp server I crate a tex file /etc/vsftpd.txt with only
two lines:
john
blabla
and convert it to BD format with

db3_load -T -t hash -f vsftpd.txt /etc/vsftpd.db
(do not use)
db_load -T -t hash -f vsftpd.txt /etc/vsftpd.db

Hope that helps
Remik


Similar Posts