LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   CentOS 5.5 vsftpd virtual users with pam_passwdfile, 530 login incorrect (https://www.linuxquestions.org/questions/red-hat-31/centos-5-5-vsftpd-virtual-users-with-pam_passwdfile-530-login-incorrect-844213/)

batfastad 11-14-2010 12:48 PM

CentOS 5.5 vsftpd virtual users with pam_passwdfile, 530 login incorrect
 
Hi everyone

I'm running CentOS 5.5 64bit and I'm trying to get an FTP server up and running so clients can dump files directly onto our shared NAS device. I've recently decommissioned our old Windows 2000 box which was running an FTP server.

vsftpd seemed like the logical choice to try since it was mentioned in most of the CentOS FTP tutorials I found.

Problem is I want to setup virtual users on the FTP server and that seems to involve building pam_pwdfile from source ( http://cpbotha.net/software/pam_pwdfile/ )
So I've downloaded it and followed the instrucions in post #8 at http://www.centos.org/modules/newbb/...topic_id=21232

Made the changes to vsftpd.conf and to /etc/pam.d/vsftpd
And created a user and passwd file using htpasswd
But when I try and login to localhost I get the following messages:

Code:

220 Welcome
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): upload
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.

Even though that's the only user I've created and I'm sure I got the password correct.
I think there's something I've screwed up with my compiling of pam_pwdfile
Do those instructions above still apply to CentOS 5.5?

Here's the contents of vsftpd.conf, only changes included:
Code:

listen=YES
local_enable=YES
chmod_enable=NO
chown_uploads=YES
chown_username=nobody
ftpd_banner=Welcome
local_umask=022
log_ftp_protocol=YES
max_clients=30
pam_service_name=vsftpd
secure_chroot_dir=/var/run/vsftpd
tcp_wrappers=YES
userlist_enable=YES
userlist_file=/etc/vsftpd/user_list
virtual_use_local_privs=YES

And here's my /etc/pam.d/vsftpd
Code:

#%PAM-1.0
session    optional    pam_keyinit.so    force revoke
auth      required    pam_listfile.so item=user sense=deny file=/etc/vsftpd/user_list onerr=$
auth      required    pam_shells.so
auth      include      system-auth
account    include      system-auth
session    include      system-auth
session    required    pam_loginuid.so

# Customized login using htpasswd file
auth    required pam_pwdfile.so pwdfile /etc/vsftpd/passwd
account required pam_permit.so

Anyone got any suggestions on what to try with this?

Anything I should be doing differently in post #8 here... http://www.centos.org/modules/newbb/...topic_id=21232

Cheers, B

bathory 11-14-2010 05:06 PM

Hi,

Why mess with pam?
You can use the scripts provided here to setup virtual users,
or follow this howto if you prefer a more hands-on experience.

Regards

batfastad 11-17-2010 05:27 AM

Thanks for the info.
I actually decided to switch to proftpd instead as it will allow me to do a mixture of authfile and ldap auth at a later stage

Cheers, B


All times are GMT -5. The time now is 04:08 AM.