Friday, 2 December 2011

VSFTPD Virtual User Bash Scripts V0.2

Updated the scripts and added the lusersnc script to sync local users. The scripts will work only with the root user login and will display an error with other logins.

Added Project to Sourceforge. License is GPL V3 and opne for review and code enhqancement by others. Please do not change author, add yourself to the list.

Download: vsftpd-vuser-scripts-v0.2.tar.gz
http://sourceforge.net/projects/vvbu/

New functionality:
All scripts - Check added to display 'Not root' when run by a non root user.
vuser.conf - added additional variables for local user's, archiving
vuseradd - additional check to see if a local user exists with the supplied username
vuserchk - additional checks for number of users and if there is a mismatch between reported total users and actual records in the vuser_list file
lusersnc - new script to sync the local user folders with the ftp folders with a symlink in the shell home folder

For next Version:
- A audit script to check user_list against ftp folders
- Script for archiving
- Archived user restoration

- Bellamkonda Sudhakar


VSFTPD Virtual User Bash Scripts

These BASH script set have been written with the purpose of making the administration of VSFTPD virtual users easy, like creation, deletion, update. The scripts assume that pam_userdb is being used for Authentication along with local shell users.
The Scripts are very customizable with a single .conf file and can be used in internal VLAN office senarios and in small to medium Production servers which face the internet.


The current version level is 0.2. Download them from http://www.mediafire.com/?j9anm89c8v6pt84

The scripts:
vuserchk - checks the necessary files and folders necessary for these scripts
vuser.conf - the file containing configuration parameters for these scripts
vuseradd - adds a virtual user
vuserdel - delets a virtual user
vuserres - restores a deleted user
vuserpas - changes a virtual user password
vusersho - displays the user password

The scripts are very verbose and will display messages and errors which are self explanatory.


What the scripts not do:
Deleting a user will remove the user from the active list and the ftp home folder is renamed to $USER-deleted and the deleted user details are copied to a user deleted list. A script to archive and move the tarball to an archive folder is on the back burner.

Panic not be Cautious: Use the scripts wisely and carefully. Please backup before any use at production servers. The scripts have been tested and used without any errors or problems.

Six are the scripts: These scripts are very non intrusive and have a simple logic flow. Prerequisites are BASH, GAWK, SED for the scripts to work. I am hoping to introduce more functionality into the scripts and add a local user ftp home sync'er and a deleted folder archiver, once finished will add them here.


Test them, deploy for ease of mind and relax and let the scripts do the work :).


-Bellamkonda Sudhakar