agriesser
(Alexander Griesser)
April 17, 2023, 5:24am
5
You can do that using mmctl
remotely, the Mattermost sysadmin just needs to allow user access tokens temporarily, but the scripts I created for that take care of that too.
There are two different ways, one using a simple mmctl user create
approach and one loading the contents of a CSV into the bulk importer utility, see the two scripts for possible ways to achieve that:
#!/bin/bash
#
# bulk user creation based on a CSV input file
# Employee Name;Employee ID;Email ID;Designation
# set to "generate" in order to create a different password for every user
PASSWORD="test123test123"
CSVFILE="test.csv"
CSVDELIM=","
# specify the name of your sysadmin account, if left blank, the script will try to find an admin
SYSADMIN=""
# specify a user access token for $SYSADMIN here, if left blank, the script will try to create a token
TOKEN=""
# override path to mmctl here (if installed outside $PATH)
MMCTLPATH="mmctl"
# leave empty if the script should try to autodetect it
This file has been truncated. show original
#!/bin/bash
#
# bulk user creation based on a CSV input file
# Employee Name;Employee ID;Email ID;Designation
# set to "generate" in order to create a different password for every user
PASSWORD="test123test123"
CSVFILE="test.csv"
CSVDELIM=","
# override path to mmctl here (if installed outside $PATH)
MMCTLPATH="mmctl"
# leave empty if the script should try to autodetect it
MMURL=""
# teams the users should join (space separated list of team names, leave empty for no teams to join, set to _all_ to add the users to all available teams)
TEAMS="_all_"
# do not change anything below this line
This file has been truncated. show original