Report of all Local User Accounts in computer


We are trying to determine which computers are being shared in the company and to do so we need to know how many users there are per machine. Is there a way to report how many local user accounts per computer we have and list them? I tried some reports, scripts, etc but they only show me lastuser or duplicate computers with the same user. Thanks

Screenshot 2023-01-18 at 4.49.47 PM.png


Contributor III

You may actually be able to take advantage of some Jamf Connect extension attributes for this goal even if your environment isn't deploying Jamf Connect.  The one below will show you all the local accounts that are not using Jamf Connect.  Combine that with some regex filtering and you should be able to track down any machine with more than one local user account. 

Actually, we are using JAMF Connect! It's not on all of our computers yet tho.
Nice I'll take a look

Contributor II

You could also use an extension attribute for this, I believe. 

Contributor II

@Frank_Sonder , take a look at this thread:

echo "<result>$(dscl . list /Users UniqueID | awk '$2>500{print $1}' | wc -l | sed 's/^ *//g')</result>"

You can use this for an Extension Attribute.

New Contributor III

This works great, thank you! Only tidbit to mention is when using this as an Extension Attribute, I initially had the output set to String. Found it best to have the output set to integer due to the wc -l command that way you can set the EA criteria to "greater than".