Skip to main content
Solved

Jamf Connect (NoMAD) and mount drives scripts based on AD group.

  • September 21, 2018
  • 2 replies
  • 41 views

Forum|alt.badge.img+4

Hi All,

I'm wondering if anyone know if it's possible to mount SMB shares based on users being in a AD group if the Mac is not bound to AD, but has Jamf Connect (NoMAD) and a valid kerberos ticket? I current have all Macs bound to AD and use a Apple script created by macmule. He's an example of said script;

-- Checks Group Membership for ADGroups contains user & if they -- are in the correct groups, mount shares. ---------
if ADGroups contains "ADGROUP" then mount volume "smb://fileshare.full.path/SHARENAME"
end if

Maybe this can't be done... hopefully it can so that I can stop binding machines to AD. If anyone has advice on this I would appreciate it.

Best answer by a_stonham

NoMAD will handle that natively. It is handled via another preference domain menu.nomad.shares.plist
See NoMAD Shares Documentation

2 replies

Forum|alt.badge.img+16
  • Honored Contributor
  • September 21, 2018

The NoMAD plist will list all groups for the current user so you could include something like:

defaults read "/Users/$user/Library/Preferences/com.trusourcelabs.nomad.plist" | grep "AD group you want to check"

If it provides a response then they are a member of that group.


Forum|alt.badge.img+7
  • Contributor
  • Answer
  • September 23, 2018

NoMAD will handle that natively. It is handled via another preference domain menu.nomad.shares.plist
See NoMAD Shares Documentation