Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > getting workgroup name

getting workgroup name
Thread Tools
mikebat
Fresh-Faced Recruit
Join Date: Oct 1999
Location: Wellington, New Zealand
Status: Offline
Reply With Quote
Mar 7, 2004, 04:32 PM
 
Hi there,

We have Mac OS X client computers which bind to a Mac OS X 10.2 server.
There are two usernames set up in the NetInfo directory; Student and Teacher.

The "Student" user belongs to several workgroups, eg. "year1", "year2", etc. so that the student can pick which year they are in and get a different set of Dock preferences.

My question is, can I somehow determine, in a shell script, which workgroup the user has chosen? If I want to find out which user is logged in I can use the global variable $USER, but there doesn't seem to be a variable for the current workgroup.


Thanks,
Mike
Cockle Bay School
Auckland, New Zealand
     
Rainy Day
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Mar 11, 2004, 05:10 PM
 
I think the answer to what you seek is either in: man groups or: apropos netinfo
     
mikebat  (op)
Fresh-Faced Recruit
Join Date: Oct 1999
Location: Wellington, New Zealand
Status: Offline
Reply With Quote
Mar 15, 2004, 11:55 PM
 
Originally posted by Rainy Day:
I think the answer to what you seek is either in: man groups or: apropos netinfo
Thank you so much Rainy Day, I found the command

id -gn

does just what I need

--
Mike
     
Rainy Day
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Mar 16, 2004, 01:10 AM
 
You're welcome.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:17 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,