Skip to main content
Question

Disable some local accounts

  • February 22, 2019
  • 3 replies
  • 38 views

Forum|alt.badge.img+8

Does anyone have a script that will detect all local accounts and disable all but a specific account?

Basically I want to disable all of the accounts on a specific Mac except the one authorized account. These macs are not AD joined.

3 replies

Forum|alt.badge.img+10
  • New Contributor
  • February 25, 2019

@Sobchak I might be able to help here, but the bigger question is; how are other accounts getting created? Do you have 1 local admin and you want to keep that account? Do you have 1 local admin and 1 standard, and you want to keep the standard? Describe the environment for me.

-Amit


Forum|alt.badge.img+8
  • Author
  • Contributor
  • February 25, 2019

Sadly our Mac users are admins and the Macs are not joined to the domain. So they could have any number of admin and standard accounts.

That being said we found a script that solves our problem.


Forum|alt.badge.img+12
  • Valued Contributor
  • February 25, 2019

I was thinking this topic sounded familiar, so I did a search to confirm my suspicion. There was an earlier thread with a solution for deleting all users except the local admin. Does that help?

https://www.jamf.com/jamf-nation/discussions/7584/delete-all-users-except-local-admin