Add to admin group membership (MACOS) - Mesh Central (Admin):
Table of Content:
About:
This guide explains how to remotely add a user to the admin group on a macOS device using MeshCentral. This gives the selected user administrator rights on that Mac.
How to:
Be extremely cautious when performing this action. Adding a user to the admin group grants full administrative privileges, which means they can:
-
Install or remove system software
-
Change critical system settings
-
Modify other user accounts
Only perform this on devices or users where admin rights are explicitly approved by your organization. A mistake here can lead to security issues or loss of system integrity.
-
You must have MeshCentral access with rights to open a terminal session on the target Mac. Go to Mesh Central. Search for the employees name and click it.
-
In the device’s control panel, click on Terminal. Then click Connect to start a remote shell session with the Mac. (You may need to wait a few seconds for the connection to establish.)
Before making changes, it’s a good idea to confirm the current admin group membership.
Run the following command:
dscl . -read /Groups/admin GroupMembership
You’ll see a list of usernames that currently belong to the admin group.
Make sure that the target user is not already listed.
l_AD/SH_Addtoadmingroupmembership(MACOS)l_AD-1.png)
- Type this code in the terminal. Make sure to take a notice of the lack of the test_user in the admin GroupMembership and take note that the user appears after the code is executed. You will likely be prompted for the administrator password.
sudo dscl . -append /Groups/admin GroupMembership usernameofuser
- Make sure to verify that the user was added successfully.
dscl . -read /Groups/admin GroupMembership
l_AD/SH_Addtoadmingroupmembership(MACOS)l_AD-1.png)
And you are done. 😄