Page 1 of 1

Batch user creation

Posted: 2023-02-06 02:29
by badacook
Hi FileZillaers

  I want to perform batch user creation via replacing the .xml configuration.
I had analysis the .xml configuration structure , in order to create user we should append user element with necessary Options under Users node,
in that step how can I generate a user password secret string with salt that conform to FileZilla user password standard in command line or with python
can I perform the salt and password creation step with python and how , is there any standard API for FileZilla management such as user and group creation .
Any one Who can offer some advice to solve this problem ,any help will be great, thanks.

Re: Batch user creation

Posted: 2023-02-06 08:04
by botg
We do not at this point offer an API for user creation.

Passwords, assumed to be in UTF-8, are hashed with PBKDF2-HMAC-SHA256 with a 32 byte long random salt. Both salt and hash are encoded as base64 in the XML.

Re: Batch user creation

Posted: 2023-02-06 09:28
by badacook
Without your promote i can not perform this task , thanks .

Re: Batch user creation

Posted: 2023-02-07 09:34
by badacook
botg wrote:
2023-02-06 08:04
We do not at this point offer an API for user creation.

Passwords, assumed to be in UTF-8, are hashed with PBKDF2-HMAC-SHA256 with a 32 byte long random salt. Both salt and hash are encoded as base64 in the XML.
another more question for encoding of the FileZilla configuration xml , when i trys to deal with the xml ,
the new user node could be append normal,but character string "
" can not be handle properly,
this the only remains problem ,and have pay very attention to encoding of the FileZilla configuration xml,
if the origin encoding is offered it would be great thanks.

Re: Batch user creation

Posted: 2023-02-07 15:43
by botg
I do not understand. Can you elaborate please?

Re: Batch user creation

Posted: 2023-02-08 01:04
by badacook
actually it is dealing with the xml configuration file with some escaping Special Characters,
some method of python built-in xml module change this escaping Special Characters in the xml file ,
originally i suspect it maybe cause by encoding.