Q : How to export user accounts from legacy system to RaidenFTPD?
target audience : ftp server owner / programmer
A : RaidenFTPD provides its own GUI (Graphical user interface) and site commands for users to create / edit user accounts on the ftp server , however sometimes you may want to export large amount of user data from other system (probably somekind of membership database with ftp service) or other kind of ftp servers .
the basic thing is that each RaidenFTPD server has a configuration file *.ftpd , and an user file *.user is associated with this *.ftpd , the user file is a simple text file with fixed format , each line in the user file represents an user account , and the following is the format of each line in the user file :
m_username,iCLASS,m_password,m_group,m_allow_ftp_account,m_out_speed,m_in_speed,
m_ratio,m_maxlogin,m_no_ipchk,history_dn_kb,history_up_kb,m_comment,m_language,m_encpass,
m_credit_mb,m_selfkill,m_pass_type,vfs_style,expiration_date,fxp_in_allow,fxp_out_allow |
field 0 m_username : user's account name , no space char is allowed , <= 12 chars
field 1 iCLASS : user's class , 0=root , 1=super , 2=normal , 3=guest
field 2 m_password : user's password (clear text) <= 32 chars (make sure there is no ':' char inside the password)
field 3 m_group : user's group name , can be multiple (group1,group2) , no space char is allowed
field 4 m_allow_ftp_account : ftp account enabled = 1 , otherwise 0
field 5 m_out_speed : user's download speed limit in KB/S , 0=no limit
field 6 m_in_speed : user's upload speed limit in KB/S , 0=no limit
field 7 m_ratio : user's 1:x ratio , 3-> 1:3 , 0=unlimited
field 8 m_maxlogin : max login number under this account at the same time
field 9 m_no_ipchk : 1=login without IP address checking , 0=perform check
field 10 history_dn_kb : total downloaded amount in KB
field 11 history_up_kb : total uploaded amount in KB
field 12 m_comment : user's comment , max 32 chars , no ':' char is allowed
field 13 m_language : user's language (default.....) see ./message dir for more options
field 14 m_encpass : encrypted password , leave empty if you put a clear text password already
field 15 m_credit_mb : user's credit in MB
field 16 m_selfkill : 1=allow user to kill its own connections by !username upon login , 0=deny
field 17 m_pass_type : 0=normal , 2=s/key md4 , 3=s/key md5 , 4=s/key sha-1 , 6=force SSL , 7=any password , 8=des local hash , 9=md5 local has , if type = 8 or 9 , hashed password is stored in field 2 and field 14 should be empty
field 18 vfs_style : "%d%d%d%d%d%d%d-" , m_download , m_upload , m_overwrite , m_delete , m_createdir , m_deletedir , m_rename , or set to empty string if the user is using server's VFS setting
field 19 expiration_date : YYYY/MM/DD , make sure to use / as separator, add a ! prefix to delete account after it expires
field 20 fxp_in_allow : 0=disallow , 1=allow
field 21 fxp_out_allow : 0=disallow , 1=allow
and the new line character is simple a "\n" , now you can write your own conversion utility to convert user accounts on other systems to RaidenFTPD easily.
|