Create vsftpd Users the Easy Way

vsftpd_logoThe FTP protocol has been around a long time, some of us remember using it fondly while others might shudder at the very mention of its name.  The fact remains it’s not going away, and it does what it’s supposed to do very well: lightweight file transfer.  Wrap this with TLS and it’s a fairly secure, cross-platform way of remote file transfer.  A simple, lightweight but feature-filled FTP daemon I prefer is VSFTPD, but managing virtual users is still a manual process.  I’ve written a simple user creation tool to make virtual users.  Let’s get started.

Download the Tool

curl https://raw.githubusercontent.com/sadsfae/misc-scripts/master/shell/create-vsftpd-user.sh \
> create-vsftpd-user.sh && chmod +x create-vsftpd-user.sh

Install httpd-tools
This requires the htpasswd tool, usually packaged in the httpd-tools package

dnf install httpd-tools

Run the Tool
Follow the prompts, specifying username and password.

# ./create-vsftpd-user.sh
==============================
=      FTP Creator 3000      =
==============================
                              
Enter username:
                  
johnnyExample  <--- enter a username
               
Enter password:
               
johnnyfivepassword  <--- enter a password

creating user johnnyExample
setting password...
Changing password for user johnnyExample.
passwd: all authentication tokens updated successfully.
Adding password for user johnnyExample

============================
    Account Summary       
                              
    user: johnnyExample          
    pass: johnnyfivepassword          
                              
============================

Github code is located here.

About Will Foster

hobo devop/sysadmin/SRE
This entry was posted in open source, sysadmin and tagged , , , , , . Bookmark the permalink.

Have a Squat, Leave a Reply ..

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.