Creating new user for Vsftpd

By jbayer - Last updated: Tuesday, October 26, 2010 - Save & Share - Leave a Comment

Vsftp is probably the most secure and fastest FTP server for UNIX-like systems. I won’t go into extolling it’s virtues, that is done on many other pages. One in particular is:

One of the things that is confusing is creating a new user. I’ve listed step by step instructions below to help:

To create a new user on the FTP server:

First ssh as root to the server:

ssh root@ftp

To create a “db4” format file, first create a plain text files with the
usernames and password on alternating lines.

For example, for two users:

user password
==== ========

test password
pub l1c


Then issue the following commands:

db_load -T -t hash -f vusers.txt vsftpd-virtual-user.db
chmod 600 vsftpd-virtual-user.db
chmod 000 vusers.txt

Finally, create the directory (using the two IDs above):

mkdir /var/ftp/test
mkdir /var/ftp/pub

and set the owner/group:

chown ftp.ftp /var/ftp/test /var/ftp/pub

Posted in Administration • Tags: Top Of Page

Write a comment