Hello, after upgrading mattermost to version 6.1.0 I have a problem while trying to create new user using “mmctl user create” command.
I used to create new users with “mattermost user create”.
Now when I run this command
/opt/mattermost/bin/mmctl user create --email newusername@example.com --username newusername --password ‘newpassword’ --firstname User --lastname Test
I get the following error:
Error: cannot read user credentials, maybe you need to use login first: stat /root/.config/mmctl/config: no such file or directory
Mattermost is run by user mattermost. If I run “su mattermost” and then run the same mmctl command, I get:
Error: cannot read user credentials, maybe you need to use login first: stat /home/mattermost/.config/mmctl/config: no such file or directory
How can I solve this problem?
Do I have to change mattermost user’s home directory to /opt/mattermost/ or /opt/mattermost/bin/ ?
It appears that the expected config file is not found. Starting on version 6.0 mmctl is using $XDG_CONFIG_HOME/mmctl/config as default config file path. @isacikgoz is there any breaking to the config format or is it sufficient to either copy or pass the previous file through the --config-path command line option?
Hey @az-bp As far as I’m seeing you are using mattermost config file as mmctl config file. They are two different files. You can either set another file or let the tool create a config file to the default config directory. In your case the tool cannot find the XDG_CONFIG_HOME directory for both users. You should set an existing path to save your config file.