LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-18-2011, 07:23 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS, FreeBSD
Posts: 3,362

Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
VSFTPD user vs. login shell definition


Hi,

I'm using VSFTPD on my office LAN for one simple task: to receive - and send - installation images created with Ghost4Linux. Until recently, my main LAN server ran on CentOS, but I decided to migrate it to Slackware (nicer release policy ).

What I usually do is create an 'install' user who can login to FTP, but not on the system. Here's an example of what I used to do on my CentOS setup:

Code:
# mkdir -p -m 0700 /home/ftp/install
# groupadd install
# useradd -d /home/ftp/install -g install -s /sbin/nologin install
# chown -R install:install /home/ftp/install
# passwd install
The relevant bits in vsftpd.conf looked like this on the CentOS server:

Code:
...
anonymous_enable=NO
...
userlist_enable=YES
userlist_deny=NO
userlist_file=/etc/vsftpd/user_list
...
Then I only had to create the /etc/vsftpd/user_list file and put a single line in it to allow the newly created user:

Code:
install
Now I've tried to get the same behaviour on Slackware, and I succeeded more or less, except for one thing. There's no way my 'install' user can login to FTP when his default shell is set to '/sbin/nologin' (or '/bin/false'). Only when I change the 'install' users' default shell to a "real" shell like '/bin/bash', he's able to login.

Here's a little practical demonstration of what's happening:

Code:
$ lftp localhost
lftp localhost:~> user install
Mot de passe : 
lftp install@localhost:~> ls
ls: L'authentification a échoué.: 530 Login incorrect.           
lftp install@localhost:~> bye
$ su -
# chsh -s /bin/bash install
# exit
$ lftp localhost
lftp localhost:~> user install
Mot de passe : 
lftp install@localhost:~> ls
lftp install@localhost:/> bye           
$
Sure, it's a small annoyance. Any idea how I can solve it anyway?
 
Old 07-18-2011, 07:42 AM   #2
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS, FreeBSD
Posts: 3,362

Original Poster
Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
Teh! I re-read the vsftpd.conf manpage and just stumbled over the solution.

Code:
check_shell
    Note! This option only has an effect for non-PAM builds of vsftpd. If disabled, vsftpd will not check /etc/shells for a valid user shell for local logins.

    Default: YES
Adding this to my vsftpd.conf file solved the problem:

Code:
check_shell=NO
 
  


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
Cannot login with local user in vsftpd smithjb Linux - Software 4 01-12-2009 06:01 AM
vsftpd user login times problem er_gaurav22 Linux - Server 1 07-13-2007 08:07 AM
vsftpd user login problems in RHEL4 dsids Linux - Security 11 07-31-2006 02:59 AM
vsftpd - only one user can login to ftp greengrocer Linux - Newbie 4 12-08-2005 06:41 AM
vsftpd : process running as user nobody left after login ? markus1982 Linux - Security 4 01-18-2003 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:24 PM.

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