Bulk import users to a specific OU

265 views
Skip to first unread message

Ryan Bahten

unread,
May 14, 2014, 5:20:10 PM5/14/14
to google-ap...@googlegroups.com
Hello, first time user of GAM so thanks in advance for your help and patience.

I'd like to add a small group of new users (about 30) to a specific sub-OU in our domain. I've got GAM functional (I can use terminal.app to create a single new user and place them in a specific OU) but I'd like to be able to import a group of users and I haven't been able to figure out a way to do it yet.

Any direction or suggestions would be very much appreciated. Thanks!

Ryan


Karl Hehr

unread,
May 14, 2014, 5:26:35 PM5/14/14
to google-ap...@googlegroups.com
Create a CSV with the specific info needed (username, firstname, lastname, password, email, org), then create a  BASH script similar to this.

#!/bin/bash

OLDIFS=$IFS
IFS=,

while read username firstname lastname password email org 
do

python gam.py create user $username firstname $firstname lastname $lastname password $password org $org



ECHO=$username
ECHO=""

done < PATHTOYOUR.csv
IFS=$OLDIFS


--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/d2117eba-4031-4580-a279-3e2b095ba0b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl H. Hehr
Technology Director
Ames Community Schools
---------------------------
twitter: karlhehr
skype: karlhehr

Ryan Bahten

unread,
May 19, 2014, 3:15:19 PM5/19/14
to google-ap...@googlegroups.com
Just wanted to update this post to say that I got it work using GAM 3.1 and the following command:

gam csv /PATHTOUSERS.csv gam create user \$email firstname \$firstname lastname \$lastname password \$password org \$org

And I should have stated this before but I'm running this on OSX 10.9.3, just for reference.

--Ran

Karl Hehr

unread,
May 19, 2014, 3:28:45 PM5/19/14
to google-ap...@googlegroups.com
Very nice.  +! to you sir.

I have not seen where you can run a GAM command and point it at a CSV.  I am still using bash scripts to point to the csv file.


--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.

Steve Samoska

unread,
Mar 2, 2015, 7:49:17 PM3/2/15
to google-ap...@googlegroups.com
I am trying to use this gam also I had it running couple years ago. but seems i missed a step or dont even know if i did it correctly again. Also I can not find any info on what windows powershell i need to use I remember the first time around we had to find a certain one but its been awhile so i dont know and if anyone can help me out would be great...

Steve


On Monday, May 19, 2014 at 2:28:45 PM UTC-5, Karl Hehr wrote:
Very nice.  +! to you sir.

I have not seen where you can run a GAM command and point it at a CSV.  I am still using bash scripts to point to the csv file.
On Mon, May 19, 2014 at 2:15 PM, Ryan Bahten <rba...@delnorte.k12.ca.us> wrote:
Just wanted to update this post to say that I got it work using GAM 3.1 and the following command:

gam csv /PATHTOUSERS.csv gam create user \$email firstname \$firstname lastname \$lastname password \$password org \$org

And I should have stated this before but I'm running this on OSX 10.9.3, just for reference.

--Ran

On Wednesday, May 14, 2014 2:20:10 PM UTC-7, Ryan Bahten wrote:
Hello, first time user of GAM so thanks in advance for your help and patience.

I'd like to add a small group of new users (about 30) to a specific sub-OU in our domain. I've got GAM functional (I can use terminal.app to create a single new user and place them in a specific OU) but I'd like to be able to import a group of users and I haven't been able to figure out a way to do it yet.

Any direction or suggestions would be very much appreciated. Thanks!

Ryan


--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager.



--
Karl H. Hehr
Technology Director
Ames Community Schools
---------------------------
twitter: karlhehr
skype: karlhehr

if you like to not receive this email please reply no thank you and your address will be removed
Reply all
Reply to author
Forward
0 new messages