Skip to main content

I am trying to create a smart group to find computers that have local user accounts that don't match the company standard user accounts. We have a specific format that our user accounts are so I need to be able to use wildcards.

Can you provide examples of what it should look like and an example of non-company standard?


You can use EA with script to find all the local users and match your criteria and report it back. Create smart group with criteria. 

#!/bin/bash list=() for username in $(dscl . list /Users UniqueID | awk '$2 > 500 && $2 < 1000 { print $1 }'); do if [[ $(dsmemberutil checkmembership -U "${username}" -G admin) != not ]]; then if [ ${username} does notmatches criteria ]; then #### add your criteria here in the if statement list+=("${username}") fi fi done echo "<result>${list[@]}</result>"

  Thanks


Can you provide examples of what it should look like and an example of non-company standard?


name.name is the company standard, anything not that would be non standard.