Skip to content

Commit e9cbd78

Browse files
committed
docs: how-to guides for user management
1 parent fedf9a1 commit e9cbd78

File tree

11 files changed

+390
-0
lines changed

11 files changed

+390
-0
lines changed

docs/guides/user/backupcodes.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# How to Get a User's 2FA Backup Codes
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user backupcodes` reference section](../../reference/cli/user.md#compiler-admin-user-backupcodes).
6+
7+
This guide explains how to use the `compiler-admin user backupcodes` command to get a list of active 2-Step Verification backup codes for a user.
8+
9+
This can be useful if a user has lost their primary 2FA device and any recovery options.
10+
11+
## Basic Usage
12+
13+
To get backup codes for a user, provide their `username`.
14+
15+
```bash
16+
compiler-admin user backupcodes some.user
17+
```
18+
19+
The command will perform the following actions:
20+
21+
1. Check if the user has existing backup codes.
22+
2. If they do, it will print them.
23+
3. If they do not, it will generate a new set of backup codes and print them.
24+
25+
The output will be a list of the user's one-time-use backup codes.

docs/guides/user/convert.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# How to Convert a User's Account Type
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user convert` reference section](../../reference/cli/user.md#compiler-admin-user-convert).
6+
7+
This guide explains how to use the `compiler-admin user convert` command to change a user's account type.
8+
9+
This process moves the user between organizational units (OUs) and updates their group memberships (e.g., adding or removing them from the "Staff" or "Partners" groups).
10+
11+
## Basic Usage
12+
13+
To convert a user, you must provide their `username` and the target `account_type`.
14+
15+
```bash
16+
compiler-admin user convert some.user staff
17+
```
18+
19+
This command would convert `some.user@compiler.la` to a "Staff" account.
20+
21+
## Available Account Types
22+
23+
The following target account types are available:
24+
25+
- `staff`: For full-time staff members.
26+
- `partner`: For partners of the company.
27+
- `contractor`: For external contractors.
28+
- `alumni`: For former employees. This is typically handled by the `offboard` command automatically.
29+
30+
## Forcing the Conversion
31+
32+
The command will ask for confirmation before proceeding. To bypass this, you can use the `--force` flag.
33+
34+
```bash
35+
compiler-admin user convert some.user contractor --force
36+
```
37+
38+
## Notifying on Conversion to Alumni
39+
40+
When converting a user to an `alumni` account, a new password is set. You can use the `--notify` option to send this new password to an email address.
41+
42+
```bash
43+
compiler-admin user convert some.user alumni --notify their.personal@email.com
44+
```

docs/guides/user/create.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# How to Create a New User
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user create` reference section](../../reference/cli/user.md#compiler-admin-user-create).
6+
7+
This guide explains how to use the `compiler-admin user create` command to create a new user account in the Compiler Google Workspace.
8+
9+
## Basic Usage
10+
11+
To create a new user, you must provide a `username` (the part of the email address before `@compiler.la`).
12+
13+
```bash
14+
compiler-admin user create new.user
15+
```
16+
17+
This creates the user `new.user@compiler.la`. The command generates a random temporary password and requires the user to change it on their first login.
18+
19+
## Notifying a Manager
20+
21+
You can send the new user's credentials to a manager or their personal email address using the `--notify` option.
22+
23+
```bash
24+
compiler-admin user create new.user --notify manager@compiler.la
25+
```
26+
27+
## Passing Additional Options to GAM
28+
29+
The `compiler-admin user create` command is a wrapper around the powerful `gam create user` command. You can pass additional arguments directly to GAM to specify more details about the user, such as their first and last name.
30+
31+
For example, to create a user and set their name:
32+
33+
```bash
34+
compiler-admin user create new.user firstname "New" lastname "User"
35+
```
36+
37+
For a full list of the available options you can pass through to GAM, please refer to the [GAM7 documentation on creating users](https://github.com/GAM-team/GAM/wiki/Users#create-a-user).

docs/guides/user/deactivate.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# How to Deactivate a User
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user deactivate` reference section](../../reference/cli/user.md#compiler-admin-user-deactivate).
6+
7+
This guide explains how to use the `compiler-admin user deactivate` command.
8+
9+
This command is a major step in the offboarding process. It secures an account by revoking access, clearing personal information, and moving the user to the "Alumni" organizational unit (OU). This command is automatically called as part of the more comprehensive `user offboard` command. For most offboarding scenarios, you should use `user offboard` instead.
10+
11+
## Actions Performed
12+
13+
The `deactivate` command performs the following actions:
14+
15+
- Removes the user from all of their groups.
16+
- Moves the user to the "Alumni" OU.
17+
- Resets their password to a random string.
18+
- Signs the user out of all active sessions.
19+
- Clears profile information (address, location, phone number, secondary email).
20+
- Resets their recovery email and phone number.
21+
- Turns off 2-Step Verification on their account.
22+
23+
## Basic Usage
24+
25+
To deactivate a user, provide their `username`.
26+
27+
```bash
28+
compiler-admin user deactivate some.user
29+
```
30+
31+
The command will ask for confirmation before proceeding. To bypass this, use the `--force` flag.
32+
33+
## Setting Recovery Information
34+
35+
You can set a new recovery email or phone number for the deactivated account using the `--recovery-email` and `--recovery-phone` options.
36+
37+
```bash
38+
compiler-admin user deactivate some.user --recovery-email personal@email.com
39+
```
40+
41+
To clear the recovery information, pass an empty string (which is the default):
42+
43+
```bash
44+
compiler-admin user deactivate some.user --recovery-email "" --recovery-phone ""
45+
```

docs/guides/user/delete.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# How to Delete a User
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user delete` reference section](../../reference/cli/user.md#compiler-admin-user-delete).
6+
7+
This guide explains how to use the `compiler-admin user delete` command to permanently delete a user account from the Compiler Google Workspace.
8+
9+
**Warning:** This action is irreversible. All of the user's data that has not been transferred or backed up will be permanently lost. For a safer, more comprehensive process, use the `user offboard` command. The `offboard` command can also delete the user as its final step.
10+
11+
## Basic Usage
12+
13+
To delete a user, provide their `username`.
14+
15+
```bash
16+
compiler-admin user delete some.user
17+
```
18+
19+
The command will ask for confirmation before proceeding.
20+
21+
## Forcing the Deletion
22+
23+
To bypass the confirmation prompt, use the `--force` flag.
24+
25+
```bash
26+
compiler-admin user delete some.user --force
27+
```
28+
29+
## Important Safeguard
30+
31+
This command will fail if the user's email address has been assigned as an alias to another account. This is a safety measure to prevent accidental deletion of an active email alias. If you intend to delete the user, you must first remove the alias from the other account.

docs/guides/user/offboard.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# How to Offboard a User
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user offboard` reference section](../../reference/cli/user.md#compiler-admin-user-offboard).
6+
7+
This guide explains how to use the `compiler-admin user offboard` command to completely and securely offboard a user from the Compiler Google Workspace.
8+
9+
This is a comprehensive command that orchestrates several other actions. For most offboarding scenarios, this is the command you should use.
10+
11+
## Actions Performed
12+
13+
The `offboard` command performs the following sequence of actions:
14+
15+
1. **Deactivates the user account**: It runs all the steps from the `user deactivate` command (moves to Alumni OU, resets password, signs out, clears profile info, etc.).
16+
2. **Backs up email**: It creates a full backup of the user's Gmail inbox and stores it locally in a `GYB-GMail-Backup-user@compiler.la` directory.
17+
3. **Transfers data**: It initiates a transfer of the user's Google Drive files and Google Calendar events to the `archive@compiler.la` account.
18+
4. **Deprovisions access**: It deprovisions POP and IMAP access for the account.
19+
5. **Sets an alias (optional)**: It can assign the user's email address as an alias to another account.
20+
6. **Deletes the account (optional)**: It can permanently delete the user's account after all other steps are complete.
21+
22+
## Basic Usage
23+
24+
To offboard a user, provide their `username`.
25+
26+
```bash
27+
compiler-admin user offboard departing.user
28+
```
29+
30+
The command will ask for confirmation before proceeding. To bypass this, use the `--force` flag.
31+
32+
## Assigning an Alias
33+
34+
To forward the user's future emails to a manager or a shared inbox, use the `--alias` option.
35+
36+
```bash
37+
compiler-admin user offboard departing.user --alias manager.user
38+
```
39+
40+
## Deleting the Account
41+
42+
If the account should be permanently deleted after the data is backed up and transferred, add the `--delete` flag. **Use this option with caution.**
43+
44+
```bash
45+
compiler-admin user offboard departing.user --delete
46+
```

docs/guides/user/reactivate.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# How to Reactivate a User
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user reactivate` reference section](../../reference/cli/user.md#compiler-admin-user-reactivate).
6+
7+
This guide explains how to use the `compiler-admin user reactivate` command to restore a previously deactivated user account.
8+
9+
## Actions Performed
10+
11+
The `reactivate` command performs the following actions:
12+
13+
- Checks that the user is currently in the "Alumni" OU (i.e., deactivated).
14+
- Adds the user back to the default "Team" group.
15+
- Moves the user to either the "Staff" or "Contractors" OU.
16+
- If moved to "Staff", adds them to the "Staff" group.
17+
- Resets their password and requires them to change it on next login.
18+
- Can update their recovery email and phone number.
19+
- Generates a new set of 2-Step Verification backup codes and prints them to the console.
20+
21+
## Basic Usage
22+
23+
To reactivate a user, provide their `username`. By default, they are reactivated as a contractor.
24+
25+
```bash
26+
compiler-admin user reactivate some.user
27+
```
28+
29+
The command will ask for confirmation before proceeding. To bypass this, use the `--force` flag.
30+
31+
## Reactivating as Staff
32+
33+
To reactivate a user as a full staff member, use the `--staff` flag.
34+
35+
```bash
36+
compiler-admin user reactivate some.user --staff
37+
```
38+
39+
## Setting Recovery and Notification Info
40+
41+
You can set the user's recovery information and notify them or a manager of the reactivation.
42+
43+
- `--recovery-email`: Sets the user's recovery email address.
44+
- `--recovery-phone`: Sets the user's recovery phone number.
45+
- `--notify`: Sends the new password credentials to the specified email address.
46+
47+
```bash
48+
compiler-admin user reactivate some.user \
49+
--staff \
50+
--recovery-email some.user.personal@email.com \
51+
--notify manager@compiler.la
52+
```

docs/guides/user/reset.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# How to Reset a User's Password
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user reset` reference section](../../reference/cli/user.md#compiler-admin-user-reset).
6+
7+
This guide explains how to use the `compiler-admin user reset` command to reset a user's password and sign them out of all sessions.
8+
9+
## Actions Performed
10+
11+
The `reset` command performs two main actions:
12+
13+
1. Generates a new, random password for the user and sets the requirement that they must change it on their next login.
14+
2. Immediately signs the user out of all active Google sessions on all devices.
15+
16+
## Basic Usage
17+
18+
To reset a user's password, provide their `username`.
19+
20+
```bash
21+
compiler-admin user reset some.user
22+
```
23+
24+
The command will ask for confirmation before proceeding.
25+
26+
## Forcing the Reset
27+
28+
To bypass the confirmation prompt, use the `--force` flag.
29+
30+
```bash
31+
compiler-admin user reset some.user --force
32+
```
33+
34+
## Notifying the User or a Manager
35+
36+
You can send the new temporary password to the user or their manager using the `--notify` option.
37+
38+
```bash
39+
compiler-admin user reset some.user --notify manager@compiler.la
40+
```

docs/guides/user/restore.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# How to Restore an Email Backup
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user restore` reference section](../../reference/cli/user.md#compiler-admin-user-restore).
6+
7+
This guide explains how to use the `compiler-admin user restore` command to restore a user's Gmail backup into the central `archive@compiler.la` account.
8+
9+
This command is used to access the emails of a user who was previously offboarded using the `user offboard` command, which creates a local backup directory.
10+
11+
## Prerequisites
12+
13+
Before running the restore command, you must have the user's local email backup directory. This directory is created by the `user offboard` command and is named in the format `GYB-GMail-Backup-username@compiler.la`.
14+
15+
This command must be run from the same parent directory where the backup folder is located.
16+
17+
## Basic Usage
18+
19+
To restore a backup for a given `username`, run the following command:
20+
21+
```bash
22+
compiler-admin user restore departing.user
23+
```
24+
25+
This command will:
26+
27+
1. Locate the backup directory `GYB-GMail-Backup-departing.user@compiler.la`.
28+
2. Connect to the `archive@compiler.la` mailbox.
29+
3. Upload all emails from the backup directory into the archive mailbox.
30+
4. Apply a new Gmail label to all restored emails with the user's original email address (`departing.user@compiler.la`) so they can be easily found and filtered within the archive account.

docs/guides/user/signout.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# How to Sign a User Out of All Sessions
2+
3+
!!! seealso "Full Command Reference"
4+
5+
For a complete reference of all options, see the [`compiler-admin user signout` reference section](../../reference/cli/user.md#compiler-admin-user-signout).
6+
7+
This guide explains how to use the `compiler-admin user signout` command to immediately invalidate a user's login sessions on all devices.
8+
9+
This is useful in case a device is lost or stolen, or if an account is suspected of being compromised. This command is also called automatically as part of the `user reset` and `user deactivate` commands.
10+
11+
## Basic Usage
12+
13+
To sign a user out, provide their `username`.
14+
15+
```bash
16+
compiler-admin user signout some.user
17+
```
18+
19+
The command will ask for confirmation before proceeding.
20+
21+
## Forcing the Signout
22+
23+
To bypass the confirmation prompt, use the `--force` flag.
24+
25+
```bash
26+
compiler-admin user signout some.user --force
27+
```
28+
29+
This will immediately revoke all of the user's active Google sessions.

0 commit comments

Comments
 (0)