Friday 20 December 2013

Find to create Pure-FTPd Account on Centos

Pre-Installation

Install Pure-FTPd

  1. In a Linux shell run the following:
#apt-get install pure-ftpd-common pure-ftpd

  1. Now we need to create a new system group for pureftpd:
#groupadd ftpgroup

  1. Now we add a user for the group and give that user no permission to a home directory or a shell:
#useradd -g ftpgroup -d /dev/null -s /etc ftpuser

Create a new user

Lets create our first FTP user. In this example our user will be "Ramesh":
#pure-pw useradd Ramesh -u ftpuser -g ftpgroup -d
/home/pubftp/Ramesh -N 10

  1. In the above command we gave him a limit of 10 MB disk space with the option "-N 10". Now you have to enter Ramesh's new password twice.
  2. By default your users will be saved in /etc/pure-ftpd/pureftpd.passwd, but first we have to update the pureftpd Database:
#pure-pw mkdb

  1. The "Database" here is simply a binary file but it is ordered and has an index for quick access.

User Information

  1. To get some user details enter the following to get a complete list of all pureftpd users:
#pure-pw list

  1. If you want to show information about a specific user:
#pure-pw showRamesh

  1. This will show you detailed information about the user "Ramesh".
  2. You will notice that the line "Directory: /home/pubftp/Ramesh/./" has a trailing ./ but you shouldn't worry as this is simply the chroot for the user, which means he can't go "above" his directory.

Resetting a password

  1. If you forget the password for a user, you can reset it as follows:
#pure-pw passwdRamesh

  1. After a password reset update your database:
#pure-pw mkdb



No comments:

Post a Comment