2014-06-20

creating Virtual users on linux server using Proftpd

  ##################################################################
 proftpd FTP server user account creation using commands    ##################################################################

note:- If you have already configured proftpd server and just want to add new user , skip to step 3 direct

////////////////
//  step 1. 
////////////////

install proftpd on system if it is not installed using apt
command is 
apt-get install  proftpd-basic


/////////////////
//  Step 2
/////////////////

enter into directory /etc/proftpd
open file proftpd.conf
uncoment line number 34 (containg text DefaultRoot ~ )
and add this line just below it

AuthUserFile    /etc/proftpd/ftpd.passwd




//////////////
// Step 3
//////////////

now add virtual user to ftp server using command 
ftpasswd --uid <uid> --gid <gid> --name <username> --shell /bin/false --home <path> --passwd

here 

uid is the user id (assign 33 and user will behave like www-data user)
gid is group id (assign 33 to work as www-data)
name is the username which you want to add to ftp server
shell is the name of shell terminal have it /bin/false
home is the directory where user will be directed after successful login
passwd is for password and need not to supply password with command 

for example i want to create a user having name indishell and want to assign /ftp directory to him if user autheticate successfully
uid and gid is 33 
command will be 

ftpasswd --uid 33 --gid 33 --name indishell --shell /bin/false --home /ftp --passwd


press enter and supply new password for the user account


//////////////
// Step 4
////////////// 
now need to chmod and chown the /etc/proftpd/ftpd.passwd and /etc/proftpd/ftpd.group
these files contains FTP server usernames/groups and its password 

chmod 400 /etc/proftpd/ftpd.passwd /etc/proftpd/ftpd.group
chown proftpd.nogroup /etc/proftpd/ftpd.passwd /etc/proftpd/ftpd.group

and now are done :)
you can login to your ftp account using command
ftp  server_IP



Note:- if you are on ubuntu server, then value of uid and gid should be 33(web server id) else you may face issue in writing files ;)

enjoy >:D<
Thank you


-==[[Love to]]==--
zero Cool ,code breaker ica, root_devil, google_warrior,INX_r0ot,Darkwolf indishell,Baba ,Silent poison India,Magnum sniper,Atul  Dwivedi,ethicalnoob Indishell,Local root indishell,Irfninja indishell,Reborn India,L0rd Crus4d3r,AR AR,Mannu, ViKi, Hardeep singh Bhuppi,Mohit, Ffe, Anju, RR Mam, Acchi bacchi(Jagriti) and DON

Share this post

2 comments

  1. Your posts are always simple, straight forward and easy to understand no matter if its a beginner or an experienced user! Good work and keep going!

    ReplyDelete
  2. Thank you bhai ji :)

    ReplyDelete

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

© 2009 Start With Linux | Mannu Linux
Designed by cyb3r.gladiat0r
Posts RSSComments RSS
Back to top