This lesson is part of the "TAMING GAM - A practical guide to GAM and GAMADV-XTD3" course.
In this lesson, we will be walking you through the set-up of GAMADV-XTD3 on an Ubuntu Linux machine. You can either watch the video below or follow the images and steps detailed below.
If you are trying to install GAM on another operating system, please refer to these articles:
Let's get started.
Let's start by opening a terminal on Ubuntu and running this command.
bash <(curl -s -S -L https://git.io/fhZWP)
Once that has run, you will see that it has added the GAM Alias to the profile file.
Before you continue, open a separate terminal window to make a couple of directories using the MKDIR command.
GAMConfig and GAMWork
Now we need to check that the alias for GAM is in our BASH Terminal using this command.
This will open the nano editor. You can use whatever editor you are comfortable with.
You will see in the last line there, my alias is defined using my path. This will obviously change based on the user that you are logged into your machine as. Once you have confirmed the GAM alias, you can close the nano editor, using CTRL X.
Go back to the first terminal that you started in and answer the question on the screen. "Can you run a full browser on this machine?" And press the Y button and enter.
It should then say "GAM is now installed. Are you ready to set up a Google API project for GAM?" Just press Y again and enter.
Now type an admin email address that is present in Google Workspace.
Click allow on the screen that pops up in your browser to allow the GAM Project Creation to access the Google Account.
Back in the terminal, you will be asked to click on a URL. You can either right-click and copy it or directly click on it, depending on your Terminal Emulator and paste it in a browser.
In the browser that you have opened with the URL, select "Desktop app" and name the OAuth client ID that you are creating. I have simply called mine GAM Ubuntu or GAM Linux. Then click the create button.
Then copy the Client ID and Client Secret one at a time and paste it into the terminal in the respective places.
Now you need to press Y to "Authorize GAM to perform Google Workspace Management operations as your admin account".
Then you need to select the scopes that you would like GAM to be responsible for.
Each scope is represented by a number. You can either select all the scopes by pressing S, unselect all scopes by pressing U, or just continue by pressing C. If you need to select a scope that has a blank next to it, then type in the number that represents that scope. You can also, if it is supported, make it read-only by adding an R after the number.
Now authorise the script in the browser window that pops up.
GAMADV-XTD3 is now authorised. We now also need to authorise GAM to manage Google Workspace user data and settings. To authorise that, just press Y again.
Now you need to type the email address of a regular Google Workspace user.
This will fail the first time. This is almost a test step. You will be asked to copy a very long URL and paste it into your browser to make this happen.
Please select from the top of the red arrow to end of the URL, at the second red arrow. And paste that URL into your browser.
When you paste the URL into your browser you will come to this page. You just need to authorise by pressing the "Authorize" button.
You are now ready to retry the authorisation. Go back to your terminal and press Y. The scopes should all pass now.
You can either close your terminal and open it again, or run this command to get started right away.
Please make sure that you adapt it for your path.
Now run this to test that you are connected to your domain.
gam info domain
Congratulations, you are ready to run GAMADV-XTD3!
There are some additional options that you can run.
gam config customer_id xxxx domain xxxx.com timezone local save verify
Well done on completing this quick lesson on how to get GAM set up for your domain on Ubuntu. If you would like to understand the full capabilities of how to use GAM and GAMADV-XTD3 for your Google Workspace, check out this full course of over 9 hours and 50 pages of free resources!