Skip to main content
Question

create a smart group based on User Account Type?

  • August 26, 2020
  • 1 reply
  • 12 views

Forum|alt.badge.img+9
  • Valued Contributor

I'm trying to determine which computers have a Mobile LDAP account that are Jamf enrolled. For example in a Computer's inventory record under Local User Accounts it has the UID, Account Type, Admin Yes/No.

Is there any way to pull the Type: Mobile LDAP into a smart group or some sort of reporting?

1 reply

dan-snelson
Forum|alt.badge.img+30
  • Honored Contributor
  • August 27, 2020

@walt The following Extension Attribute code may prove helpful:

#!/bin/sh

loggedInUser=$(stat -f%Su /dev/console)

if [[ $( /usr/bin/dscl . read /Users/${loggedInUser} OriginalAuthenticationAuthority 2>/dev/null) ]]; then
    echo "<result>$loggedInUser is an Active Directory Mobile account</result>"
else
    echo "<result>$loggedInUser is a Local Directory account</result>"
fi

exit 0