LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 11-14-2010, 12:48 PM   #1
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Linux Mint, IPCop, PS2Linux
Posts: 91

Rep: Reputation: 23
Question 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
 
Old 11-14-2010, 05:06 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,908

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
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
 
Old 11-17-2010, 05:27 AM   #3
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Linux Mint, IPCop, PS2Linux
Posts: 91

Original Poster
Rep: Reputation: 23
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd 530 login incorrect pocon Slackware 7 03-08-2012 07:30 AM
vsftpd : 530 login incorrect sheelavantar Slackware 7 09-14-2010 04:07 AM
vsftpd & virtual users - 530 Login incorrect mjtice Linux - Software 3 12-08-2008 03:15 PM
ProFTPD [530 Login incorrect] dmjendor Linux - General 0 11-11-2008 04:15 PM
vsftpd 1.1.2 on redhat 7.1 -- 530 incorrect login issue triggerfish Linux - Software 4 08-17-2003 07:58 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration