Re: [GAM] Using GAM within a Bash loop

155 views
Skip to first unread message

Jay Lee

unread,
Jun 12, 2013, 10:35:29 AM6/12/13
to google-ap...@googlegroups.com
What does:

for i in `cat /Users/username/Desktop/Users.txt ` ; echo "email: $i";  done

show?


Regards,

Jay Lee
Large Customer Deployment Lead   |  Dito


On Wed, Jun 12, 2013 at 10:13 AM, Dean Landry <lan...@kingswood.edu> wrote:
I am trying to modify a group of users from a text file of email addresses.  On Mac OS X with GAM 2.993, I've tried the following (not changing anything at this point):

for i in `cat /Users/username/Desktop/Users.txt ` ; do python gam.py info user $i ;  done

But I get this error for each line in the file:

Error 403: Not Authorized to access this resource/api - forbidden

I am able to run the 'gam info user' command outside the for loop.   Does anyone know how to handle this?

Thanks,
Dean

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jim Norris

unread,
Jul 17, 2013, 1:05:21 PM7/17/13
to google-ap...@googlegroups.com
Jay,

I'm having this same exact issue using GAM 2.55. Trying to delete nicknames from a csv, echoing out each line produces email: (useremail) properly and I'm able to run gam delete alias (alias) fine if I run it individually.


On Wednesday, June 12, 2013 10:35:29 AM UTC-4, Jay Lee wrote:
What does:

for i in `cat /Users/username/Desktop/Users.txt ` ; echo "email: $i";  done

show?


Regards,

Jay Lee
Large Customer Deployment Lead   |  Dito


On Wed, Jun 12, 2013 at 10:13 AM, Dean Landry <lan...@kingswood.edu> wrote:
I am trying to modify a group of users from a text file of email addresses.  On Mac OS X with GAM 2.993, I've tried the following (not changing anything at this point):

for i in `cat /Users/username/Desktop/Users.txt ` ; do python gam.py info user $i ;  done

But I get this error for each line in the file:

Error 403: Not Authorized to access this resource/api - forbidden

I am able to run the 'gam info user' command outside the for loop.   Does anyone know how to handle this?

Thanks,
Dean

--
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.
Reply all
Reply to author
Forward
0 new messages