1

In trying to set up vsftpd to use virtual users I hit this problem.

I created a database file:

db_load -T -t hash -f users.txt /etc/vsftpd/users.db

And /etc/pam.d/vsftpd:

session optional pam_keyinit.so force revoke
auth    required pam_userdb.so db=/etc/vsftpd/users.db
account required pam_userdb.so db=/etc/vsftpd/users.db

But despite the database being readable by the vsftpd process, I end up with this in /var/log/auth.log

pam_userdb(vsftpd:auth): user_lookup: could not open database `/etc/vsftpd/users.db': No such file or directory

1

The key is that pam_userdb silently adds .db to the path, so you need this config instead

session optional pam_keyinit.so force revoke
auth    required pam_userdb.so db=/etc/vsftpd/users
account required pam_userdb.so db=/etc/vsftpd/users

This isn't mentioned in the man page, and in fact the example given incorrectly uses /etc/dbtest.db instead of /etc/dbtest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.