Batch user creation

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
badacook
504 Command not implemented
Posts: 8
Joined: 2023-02-02 05:22
Last name: badacook

Batch user creation

#1 Post by badacook » 2023-02-06 02:29

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.

User avatar
botg
Site Admin
Posts: 35508
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Batch user creation

#2 Post by botg » 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.

badacook
504 Command not implemented
Posts: 8
Joined: 2023-02-02 05:22
Last name: badacook

Re: Batch user creation

#3 Post by badacook » 2023-02-06 09:28

Without your promote i can not perform this task , thanks .

badacook
504 Command not implemented
Posts: 8
Joined: 2023-02-02 05:22
Last name: badacook

Re: Batch user creation

#4 Post by badacook » 2023-02-07 09:34

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.

User avatar
botg
Site Admin
Posts: 35508
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Batch user creation

#5 Post by botg » 2023-02-07 15:43

I do not understand. Can you elaborate please?

badacook
504 Command not implemented
Posts: 8
Joined: 2023-02-02 05:22
Last name: badacook

Re: Batch user creation

#6 Post by badacook » 2023-02-08 01:04

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.

Post Reply