I am running MM with docker and am trying to create a new user.
Most of my users are github/Keycloak based users, but now I have to create a local user and ran into the issue below.
I worked my way through the error messages and have now local mode enabled, I can see the socket is created:
mattermost@c1a09d28c321:~$ ls -l /var/tmp
total 0
srw------- 1 mattermost mattermost 0 Apr 3 17:38 mattermost_local.socket
Calling mmctl like below:
mmctl user create --local --email name.lastname@t-online.de --username "name.lastname" --password mypassword --config /mattermost/config/config.json
Error: Unable to create user. Error: : Der Login schlug fehl, weil das Passwort ungültig ist., invalid password
Not sure what password is expected, also a bit strange that the error comes up in German.
Anyone got an idea what might be going on?
you can skip the --config option, this is not meant to be the Mattermost server’s config.json, but a local configuration file for mmctl where you can store settings for it.
And compare the rules there with the password you tried to set? I can reproduce this error message only when I break the configured rules for the new password (in my example below, it’s too short).
With regards to the error message being in German: This happens when the LocalizationSettings.DefaultClientLocale is set to German. mmctl is also just a client and when it establishes a session, it inherits the locale setting:
# mmctl --local config get LocalizationSettings
{
"DefaultServerLocale": "en",
"DefaultClientLocale": "de",
"AvailableLocales": ""
}
# mmctl --local user create --email asdf@asdf.com --username asdf --password asdf
Error: Unable to create user. Error: : Der Login schlug fehl, weil das Passwort ungültig ist., invalid password
A server restart is necessary after changing the DefaultClientLocale, JFYI.
I think I initially got an error that the config file can’t be found, but can’t reproduce this behaviour any longer. Maybe it had to with local not set to true initially.
And there’s the problem, min length 10! The error message is a little misleading as I read this as somehow mmctl is unable to logon, but hey, problem solved!
Makes perfect sense now.
I really appreciate your quick and comprehensive help with this.
Thanks a lot