We can use this to get local accounts:
$ dscl /Local/Default -list /Users UniqueID | awk '$2 >= 100 { print $1 }'
But it returns some system accounts. How do we exclude these (they begin with underscore)?
Thanks,
Don
We can use this to get local accounts:
$ dscl /Local/Default -list /Users UniqueID | awk '$2 >= 100 { print $1 }'
But it returns some system accounts. How do we exclude these (they begin with underscore)?
Thanks,
Don
Best answer by jstrauss
Try:
dscl /Local/Default -list /Users UniqueID | awk '$2 >= 100 { print $1 }' | grep -v "_"
Hope this helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.