You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
I have created a script for bulk user creation of 500 user the script reads 500 username and password from a csv file and created them using /usr/bin/create-account -config /etc/dendrite/dendrite.yaml -username $username -password
The script is as follow:
#!/bin/bash# Assuming your CSV file has two columns: username,password# Adjust accordingly if your CSV format is different
CSV_FILE="usernames_passwords.csv"# Check if CSV file existsif [ !-f"$CSV_FILE" ];thenecho"CSV file $CSV_FILE not found."exit 1
fi# Loop through each line in the CSV filewhile IFS=','read -r username password;do# Print the username and passwordecho"Creating user: $username with password: $password"# Execute the create-account command with the username and password
/usr/bin/create-account -config /etc/dendrite/dendrite.yaml -username "$username" -password "$password"# Add a 1-second delay
sleep 1
done<"$CSV_FILE"
Here is a sample of console i get after running the script:
Creating user: user_1001 with password: tsr0E4Mkha
INFO[0000] Created account: user_1001 (AccessToken: hmzXH1DODVbmHfTpqwT3zpg0LfrNRq53VvmX705cCBc)
Creating user: user_1002 with password: oCwwM12fHy
INFO[0000] Created account: user_1002 (AccessToken: xiGSiaOBe_FreHhOgDrRqoCC7HK7z5HAlQUL5uipCqs)
Creating user: user_1003 with password: ooCVDxYw9G
INFO[0000] Created account: user_1003 (AccessToken: qDQMH-lJYqU-KviUkJXh0wGaFrxs6fBWhlBDhQ2Bqu4)
Creating user: user_1004 with password: z8CsklxNte
INFO[0000] Created account: user_1004 (AccessToken: BdkLUF7OQ981GNKXNtzKQ88qiW0SvMlaj-tmGVPIl7A)
Creating user: user_1005 with password: caxpQYNkF9
INFO[0000] Created account: user_1005 (AccessToken: tZSzzX5wp4YX9z355CE2u7fv_8-9wr8b5_iyVP42O98)
Those are the users created in this case (frome the csv file):
user_1001
tsr0E4Mkha
user_1002
oCwwM12fHy
user_1003
ooCVDxYw9G
user_1004
z8CsklxNte
user_1005
caxpQYNkF9
The text was updated successfully, but these errors were encountered:
Background information
Description
The text was updated successfully, but these errors were encountered: