Skip to main content
Question

create a smart group based on User Account Type?

  • August 26, 2020
  • 1 reply
  • 0 views

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

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+28
  • Honored Contributor
  • 632 replies
  • 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

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings