Posted on 08-26-2020 02:02 PM
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?
Posted on 08-26-2020 07:06 PM
@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