LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-03-2010, 09:59 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Rep: Reputation: 33
vsFTP : unable to log in with local user


Hello.

I have problems with vsftpd and local user connection through ftp.

I have created a local user :
Code:
bash-3.2# cat /etc/group | grep user
user:x:504:
bash-3.2# cat /etc/passwd | grep user
user:x:504:504::/etc/dir/:/bin/false
This is a user solely for FTP-acces to the directory /etc/dir/

My vsftpd.conf :
Code:
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=02
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
#ftp_username=
#max_per_ip=
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
chroot_local_user=YES

But I am not able to make a connection via FTP :
Code:
[jonas@jonas ~]$ ftp servername
Connected to servername (XX.XX.XX.XX).
220 Welcome to FTP service.
Name (servername:jonas): user
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp>
My user is not in de files that deny access :
Code:
bash-3.2# cat user_list | grep user
bash-3.2# cat ftpusers | grep user
bash-3.2#

Is this because I have /bin/false as shell ?? FTP needs no shell ??

Last edited by jonaskellens; 03-03-2010 at 10:02 AM.
 
Old 03-03-2010, 10:12 AM   #2
TuPari
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by jonaskellens View Post

Is this because I have /bin/false as shell ?? FTP needs no shell ??
Check if /bin/false is in /etc/shells. FTPd assumes that a user w/o a shell in /etc/shells has a disabled login.

Also check that /etc/pam.d/vsftpd exists and is set up correctly.
 
Old 03-03-2010, 11:34 AM   #3
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
/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/ftpusers onerr=succeed
auth       required     pam_shells.so
auth       include      system-auth
account    include      system-auth
session    include      system-auth
session    required     pam_loginuid.so
/etc/shells :
Code:
bash-3.2# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
So I need to add /bin/false ?

Or is it better to give the user the shell "/sbin/nologin" ??
 
  


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
unable to connect to VSFTP using local user prashsharma Linux - Server 6 12-25-2014 03:39 AM
how to make that local user can log on any computer in LAN njac Linux - Networking 1 09-02-2007 05:37 AM
vsftp.conf slackware -- local user login Pozican Linux - Software 3 05-08-2005 11:03 AM
unable to log in to a user account cheema Mandriva 1 12-25-2004 10:34 AM
change password local user vsftp ?? cosmonate Linux - Security 8 02-19-2003 08:56 AM


All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration