Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-03-2011, 10:58 PM   #1
LQ Newbie
Registered: Aug 2011
Posts: 4

Rep: Reputation: Disabled
Configuring vsftpd to handle guest and local users differently

I've just installed vsftpd version 2.3.2 on Ubuntu. It's running, but I'm having trouble logging in "guest" users.

Ideally, I'd like to consider everyone with an SSH login (ie. everyone in /etc/passwd except those in /etc/ftpusers) as a "local" user, who logs in using their regular credentials and ends up in their HOME directory. Additionally, I'd like extra "virtual" users to be added to a htpasswd file at /etc/vsftpd/virtual-users and be treated as guests - they all get dumped into a common directory at /home/virtualftp.

My /etc/pam.d/vsftpd file looks like this:

# Enable virtual users access (ie. users who do not have a SSH login)
auth    sufficient pwdfile /etc/vsftpd/virtual-users
account sufficient

# Standard behaviour for ftpd(8).
auth    required item=user sense=deny file=/etc/ftpusers onerr=succeed

# Note: vsftpd handles anonymous logins on its own. Do not enable

# Standard pam includes
@include common-account
@include common-session
@include common-auth
auth    required
By making the pwdfile "sufficient" and putting it first, I'm still able to login using a local account.

Logging in via an account in the virtual-users file however, returns this error:

500 OOPS: cannot locate user entry:guest
ftp: Login failed

I can't figure out where it's looking for this user entry. I tried playing with the guest _username option, but discovered that it only works with the guest_enabled option which then makes all logins guest instead of just those that aren't local. If guest_username won't do what I want, I'll use user_config_dir instead and create a conf file for every guest user that just specifies their local_root.

Unfortunately I can't get past the "cannot locate user entry" problem.

Any suggestions?
Old 08-14-2011, 08:28 PM   #2
LQ Newbie
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
I didn't receive any replies and I think I probably didn't describe what I actually want to do properly. Let me try again:

Ultimately I'd like to have the FTP server authenticate users who already have a shell account on the server as usual, placing them in their HOME directory. Additionally, I'd like to be able to add FTP accounts that do not have shell access. Those users would all be taken to a common HOME directory and have restricted permissions.

Can anyone suggest a way to do this?


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 Local Users hmartires Linux - Server 2 05-22-2008 04:14 PM
vsFTPd virtual AND local users gag.halfrunt Linux - Software 0 02-17-2006 11:25 AM
vsftpd local users read-only fluffyvoidbunny Linux - Networking 2 02-07-2006 12:55 PM
vsftpd and local users mieslep Linux - Networking 6 11-05-2004 01:21 PM
vsftpd and (some) local users totothehero Linux - Networking 0 09-29-2004 05:08 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:08 PM.

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