VSFTPD + MYSQL + PAM_MYSQL
Anoop Bhat
abhat at interpublic.com
Mon Oct 4 19:39:08 UTC 2004
Hi,
has anyone got vsftpd and mysql working together for auth on rhel 3?
here is the mail i sent to chris evans, anyone have any idea where my
configs are failing?
====================
Hi Chris,
I'm trying to implement vsftpd with pam_mysql and the documentation out
there for it is quite scarce. Perhaps you can help me identify the problem?
I think you will find this info useful
I'm running Redhat Enterprise 3.0 on an HP Proliant DL360 G2.
Mysql and VSFTPD are installed and so is pam_mysql.so in /lib/security.
The db is filexfer and the table is user and the passwords are stored in
clear text (not my implementation).
my /etc/pam.d/vsftp contains
auth required pam_listfile.so item=user sense=deny
file=/etc/vsftpd.ftpusers onerr=succeed
auth required pam_stack.so service=system-auth
auth required pam_shells.so
account required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
auth optional pam_mysql.so user=root passwd=<pass> db=filexfer
table=user usercolumn=username passwdcolumn=passwd crypt=0 sqllog=0
account required pam_mysql.so user=root passwd=<pass> db=filexfer
table=user usercolumn=username passwdcolumn=passwd crypt=0 sqllog=0
and I am able to log select statements as well
mysqld.log shows
041004 13:09:41 4 Connect root at localhost on filexfer
4 Init DB filexfer
4 Query SELECT passwd FROM user WHERE
username='jbayerdc'
4 Quit
when jbayerdc tries to log in. Note that jbayerdc is not a system
account at all. my personal account on the system however does have access.
/var/log/messages shows
Oct 4 13:09:41 testkick vsftpd(pam_unix)[1684]: check pass; user unknown
Oct 4 13:09:41 testkick vsftpd(pam_unix)[1684]: authentication failure;
logname= uid=0 euid=0 tty= ruser= rhost=127.0.0.1
Oct 4 13:09:41 testkick vsftpd[1684]: pam_sm_authenticate called.
Oct 4 13:09:41 testkick vsftpd[1684]: dbuser changed.
Oct 4 13:09:41 testkick vsftpd[1684]: dbpasswd changed.
Oct 4 13:09:41 testkick vsftpd[1684]: database changed.
Oct 4 13:09:41 testkick vsftpd[1684]: table changed.
Oct 4 13:09:41 testkick vsftpd[1684]: usercolumn changed.
Oct 4 13:09:41 testkick vsftpd[1684]: passwdcolumn changed.
Oct 4 13:09:41 testkick vsftpd[1684]: crypt changed.
Oct 4 13:09:41 testkick vsftpd[1684]: sqllog changed.
Oct 4 13:09:41 testkick vsftpd[1684]: db_connect called.
Oct 4 13:09:41 testkick vsftpd[1684]: returning 0 .
Oct 4 13:09:41 testkick vsftpd[1684]: db_checkpasswd called.
Oct 4 13:09:41 testkick vsftpd[1684]: pam_mysql: where clause =
Oct 4 13:09:41 testkick vsftpd[1684]: SELECT passwd FROM user WHERE
username='jbayerdc'
Oct 4 13:09:41 testkick vsftpd[1684]: sqlLog called.
Oct 4 13:09:41 testkick vsftpd[1684]: returning 0 .
Oct 4 13:09:41 testkick vsftpd[1684]: returning 0.
logging in shows
Connected to localhost (127.0.0.1).
220 (vsFTPd 1.2.0)
Name (localhost:anoop): jbayerdc
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> bye
221 Goodbye.
Any reason as to why its not logging in? Thanks in advance for any help
you can provide.
btw, are there any mailing lists regarding vsftpd?
thanks
Anoop
======================
any ideas?
thanks
anoop
More information about the redhat-list
mailing list