Category filter

Script to Revoke/Give Admin rights to Standard User in Mac

Administrative privileges are necessary for making system-wide changes like adding/managing users, adding/deleting programs etc. Using the following scripts, you can revoke or grant admin rights to a user through Hexnode.

Disclaimer:


The Sample Scripts provided below are adapted from third-party Open-Source sites.

Jump To

Revoking admin rights of an account

Giving admin rights to a standard account

Give admin rights to a standard account for 30 minutes

Provide the username as the argument when executing the script through the portal.

After executing the script, the device (logged in with the given user account) displays a prompt, ” You have now been granted administrator rights for 30 minutes. Please do not misuse this privilege. “. The user has to click on the ‘Make me an admin‘ button to obtain the admin privileges.

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository