This repository offers Bash scripts that simplify user management in Google Workspace using the GAM and GAMADV-XTD3 command-line tool, automating tasks like onboarding, offboarding, and reporting for consistent and efficient administration.
- GAMADV-XTD3: Ensure that GAMADV-XTD3 is installed and configured on your machine.
- Bash: The scripts are designed to run in a Bash shell environment.
-
Onboarding Script (
onboard.sh
):- Creates new user accounts.
- Sets up email signatures and group memberships.
- Adds employment details and calendar events.
-
Offboarding Script (
offboard.sh
):- Resets passwords and clears recovery options.
- Transfers Drive and Calendar data.
- Configures email forwarding and auto-replies.
- Removes users from groups and hides them from the Global Address List (GAL).
-
Reporting Script (
print.sh
):- Generates comprehensive reports including:
- Organizations
- Users
- Groups
- Aliases
- Admin roles
- Calendars
- Resources
- Shared Drive ACLs
- Generates comprehensive reports including:
-
Install Dependencies: Ensure that all required tools and dependencies are installed. This includes GAM and GAMADV-XTD3, which can be installed using the following commands:
bash <(curl -s -S -L https://gam-shortn.appspot.com/gam-install) bash <(curl -s -S -L https://raw.githubusercontent.com/taers232c/GAMADV-XTD3/master/src/gam-install.sh)
-
Clone the Repository:
git clone https://github.com/grace-bible/GAM-boarding-scripts.git
-
Configure
config.env
:- Create a
config.env
file with necessary environment variables such asGAM
,GAM3
,LOG_DIR
,SIG_FILE
,CC_HR
,BDAY_CAL
, andUPDATE_INTERVAL_DAYS
.
# This is a configuration file for onboarding and offboarding scripts GAM=$HOME/bin/gam/gam GAM3=$HOME/bin/gamadv-xtd3/gam LOG_DIR=/path/to/logs SIG_FILE=/path/to/signature/template [email protected] [email protected] GAM_LAST_UPDATE="2000-01-01" UPDATE_INTERVAL_DAYS=7
- Create a
./onboard.sh (-h) [<onboard_first_name> <onboard_last_name> <onboard_user> <manager_email_address> <recovery_email> <campus> <job_title> <birthday>]
Options:
-h
: Print the help message.
Arguments:
onboard_first_name
: User's first name.onboard_last_name
: User's last name.onboard_user
: New domain email for the user.manager_email_address
: User's manager email.recovery_email
: Personal email for the onboarding user.campus
: Assigned campus (AND, SW, CRK, MT, SYS).job_title
: User's official job title (optional).birthday
: User's birthday (YYYY-MM-DD) for the company birthday calendar (optional).
./offboard.sh (-h) [<offboard_user> <receiving_user>]
Options:
-h
: Print the help message.
Arguments:
offboard_user
: User email for the offboarding user.receiving_user
: User email for the receiving user of any transfers.
./print.sh
- Generates various reports on users, groups, calendars, and more.
- The scripts include interactive menus for selecting and executing tasks.
- The
config.env
file simplifies personalization of the scripts in one location. - All scripts check for updates to ensure compatibility with the latest Google Workspace APIs.
- Review and test the scripts in a controlled environment before deploying them in production.
- Feel free to submit issues and pull requests to improve functionality and compatibility.
This project is licensed under the MIT License.