Posted on 12-08-2015 08:48 AM
I am looking to identify shared computers by creating a smart group that detects more than 4 local user accounts. It is not a sure fire way to know if they are shared but that works for us.
My idea is that the smart computer group criteria is "computers with more than 4 local user accounts"
Is this possible?
Posted on 12-08-2015 08:57 AM
Unfortunately, the criteria labeled "Local User Accounts" does not offer a count option. It can only be used to locate machines that have this or that local account on them. I don't think there is a native criteria option for this, so you may need to put together an Extension Attribute, then give it some time for your Macs to submit inventory back to the JSS.
If you need help with an Extension Attribute script for this, just holler.
Posted on 12-08-2015 09:13 AM
Will do. Thanks @mm2270
Posted on 12-08-2015 10:08 AM
All Local Accounts
#!/bin/sh
echo "<result>$(dscl . list /Users | wc -l | sed 's/^ *//g')</result>"
All Accounts Above 500
#!/bin/sh
echo "<result>$(dscl . list /Users UniqueID | awk '$2>500{print $1}' | wc -l | sed 's/^ *//g')</result>"
Posted on 07-16-2019 07:22 AM
I know this is an old thread, but if you've stumbled across it and this is something you'd like to see: