Pre-Installation
Install Pure-FTPd
- In a Linux shell run the following:
#apt-get
install pure-ftpd-common pure-ftpd
- Now we need to create a new system group for pureftpd:
#groupadd
ftpgroup
- 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
- 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.
- 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
- The "Database" here is simply a binary file but it is ordered and has an index for quick access.
User Information
- To get some user details enter the following to get a complete list of all pureftpd users:
#pure-pw
list
- If you want to show information about a specific user:
#pure-pw
showRamesh
- This will show you detailed information about the user "Ramesh".
- 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
- If you forget the password for a user, you can reset it as follows:
#pure-pw
passwdRamesh
- After a password reset update your database:
#pure-pw
mkdb
No comments:
Post a Comment