Skip to main content
Solved

AD/Centrify and Inventory

  • October 2, 2012
  • 9 replies
  • 20 views

Forum|alt.badge.img+4

Hi
I'd like to get more of the AD groups and OU details imported with the Macs into JSS. Is there an easy way to do this?

Cheers,

Best answer by sf5678

what information are you trying to get?

9 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • 7886 replies
  • October 2, 2012

Its been a while since I've used it, but I know that Centrify has some command line tools to get information from a system about its AD status, possibly the OU its in, etc.

I also remember that Centrify's documentation on this was incredibly weak. Took me forever just to find some docs on how these tools worked. That may have changed though. I would look into this as a start though. Almost sure there are ways to get this information using a script in an Extension Attribute.


Forum|alt.badge.img+3
  • New Contributor
  • 2 replies
  • Answer
  • October 10, 2012

what information are you trying to get?


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 17 replies
  • October 10, 2012

I'm trying to get some kind of group info like OU or GID.


Forum|alt.badge.img+3
  • New Contributor
  • 2 replies
  • October 10, 2012

Starting from version 5.x Centrify's got this cool tool called adedit which provides ways to get AD information from *nix and Mac OS X machine. Command to retrieve Zone related AD information is quite different from that of just AD objects. You need to be more specific about what information you want to get.


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 17 replies
  • November 12, 2012

Ideally I'd like to be able to retrieve OU information and gather that in the inventory.


Forum|alt.badge.img+13
  • Valued Contributor
  • 478 replies
  • May 16, 2013

Not currently available via adinfo, to my knowledge. You can get your current zone, but that could certainly transcend OUs.


Forum|alt.badge.img+7
  • Contributor
  • 46 replies
  • May 21, 2013

adquery might give you some of the info you are looking for.

For the primary and unix groups for a user
adquery user --adgroups <usernamehere>

For the Active Directory groups for a user
adquery user --adgroups <usernamehere>

I'm not sure how to get the AD OU that the Mac is joined to.


Forum|alt.badge.img+7
  • Contributor
  • 46 replies
  • May 21, 2013

It took Centrify Support 26 minutes to respond with this which works for me.

You can use the adquery command to actually query the computer object as well.
So if for example a Mac with the hostname "test-mac" is located in the OU "/Testing OU/Mac Computers/", then the command:

adquery user -C test-mac

Will return the canonical name: domain.com/Testing OU/Mac Computers/test-mac

Alternatively, you can also query for the distinguished name as well:

adquery user -D test-mac

Returns: CN=test-mac,OU=Mac Computers,OU=Testing OU,DC=domain,DC=com


Forum|alt.badge.img+13
  • Valued Contributor
  • 478 replies
  • May 22, 2013

Makes sense, as computer objects are users. Good for that support rep (as the one I got didn't come up with that).