Change user password - C#

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
brunozp
500 Command not understood
Posts: 2
Joined: 2023-07-16 02:29
First name: Bruno
Last name: Pereira

Change user password - C#

#1 Post by brunozp » 2023-07-16 02:31

Hi,

is it possible to change users password from a C# application ?
If so, is there any example ?

Thanks.

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

Re: Change user password - C#

#2 Post by botg » 2023-07-17 07:51

In users.xml 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.

You could directly edit the users.xml file and afterwards instruct the service to reload its configuration: Open the service with OpenService, then call ControlService SERVICE_CONTROL_PARAMCHANGE.

brunozp
500 Command not understood
Posts: 2
Joined: 2023-07-16 02:29
First name: Bruno
Last name: Pereira

Re: Change user password - C#

#3 Post by brunozp » 2023-07-18 16:44

It worked! Thanks :D

Post Reply