|
1 | 1 | # `manage`
|
2 | 2 |
|
3 |
| -Includes admin-related subcommands. |
4 | 3 |
|
5 |
| -## `manage verify-email <username> <email>` |
| 4 | +The MAS CLI provides several subcommands for managing users and configurations |
6 | 5 |
|
7 |
| -Mark a user email address as verified |
| 6 | +Global options: |
| 7 | +- `--config <config>`: Path to the configuration file. |
| 8 | +- `--help`: Print help. |
| 9 | + |
| 10 | +## `manage add-email` |
| 11 | + |
| 12 | +Add an email address to the specified user. |
| 13 | + |
| 14 | +``` |
| 15 | +$ mas-cli manage add-email <username> <email> |
| 16 | +``` |
| 17 | + |
| 18 | +## `manage verify-email` |
| 19 | + |
| 20 | +[DEPRECATED] Mark an email address as verified. |
| 21 | + |
| 22 | +``` |
| 23 | +$ mas-cli manage verify-email <username> <email> |
| 24 | +``` |
| 25 | + |
| 26 | +## `manage set-password` |
| 27 | + |
| 28 | +Set a user password. |
| 29 | + |
| 30 | +Options: |
| 31 | +- `--ignore-complexity`: Don't enforce that the password provided is above the minimum configured complexity. |
| 32 | + |
| 33 | +``` |
| 34 | +$ mas-cli manage set-password <username> <password> --ignore-complexity |
| 35 | +``` |
| 36 | + |
| 37 | +## `manage issue-compatibility-token` |
| 38 | + |
| 39 | +Issue a compatibility token for a user. |
| 40 | + |
| 41 | +Options: |
| 42 | +- `--device-id <device_id>`: Device ID to set in the token. If not specified, a random device ID will be generated. |
| 43 | +- `--yes-i-want-to-grant-synapse-admin-privileges`: Whether the token should be given admin privileges. |
| 44 | + |
| 45 | +``` |
| 46 | +$ mas-cli manage issue-compatibility-token <username> --device-id <device_id> --yes-i-want-to-grant-synapse-admin-privileges |
| 47 | +``` |
| 48 | + |
| 49 | +## `manage provision-all-users` |
| 50 | + |
| 51 | +Trigger a provisioning job for all users. |
| 52 | + |
| 53 | +``` |
| 54 | +$ mas-cli manage provision-all-users |
| 55 | +``` |
| 56 | + |
| 57 | +## `manage kill-sessions` |
| 58 | + |
| 59 | +Kill all sessions for a user. |
| 60 | + |
| 61 | +Options: |
| 62 | +- `--dry-run`: Do a dry run, ie see which sessions would be killed. |
| 63 | + |
| 64 | +``` |
| 65 | +$ mas-cli manage kill-sessions <username> --dry-run |
| 66 | +``` |
| 67 | + |
| 68 | +## `manage lock-user` |
| 69 | + |
| 70 | +Lock a user. |
| 71 | + |
| 72 | +Options: |
| 73 | +- `--deactivate`: Whether to deactivate the user. |
| 74 | + |
| 75 | +``` |
| 76 | +$ mas-cli manage lock-user <username> --deactivate |
| 77 | +``` |
| 78 | + |
| 79 | +## `manage unlock-user` |
| 80 | + |
| 81 | +Unlock a user. |
| 82 | + |
| 83 | +``` |
| 84 | +$ mas-cli manage unlock-user <username> |
| 85 | +``` |
| 86 | + |
| 87 | +## `manage register-user` |
| 88 | + |
| 89 | +Register a user. This will interactively prompt for the user's attributes unless the `--yes` flag is set. It bypasses any policy check on the password, email, etc. |
| 90 | + |
| 91 | +Options: |
| 92 | +- `--username <username>`: Username to register. |
| 93 | +- `--password <password>`: Password to set. |
| 94 | +- `--email <email>`: Email to add. Can be specified multiple times. |
| 95 | +- `--upstream-provider-mapping <UPSTREAM_PROVIDER_ID:SUBJECT>`: Upstream OAuth 2.0 provider mapping. Can be specified multiple times. |
| 96 | +- `--admin`: Make the user an admin. |
| 97 | +- `--no-admin`: Make the user not an admin. |
| 98 | +- `--yes`: Don't ask questions, just do it. |
| 99 | +- `--display-name <display_name>`: Set the user's display name. |
| 100 | +- `--ignore-password-complexity`: Don't enforce that the password provided is above the minimum configured complexity. |
| 101 | + |
| 102 | +``` |
| 103 | +$ mas-cli manage register-user |
| 104 | +``` |
0 commit comments