Making a user account an administrator on Mac (Terminal)

Tags mac

Summary

This article outlines the steps for granting a user admin rights on a Mac using Terminal. This can be useful for setting the privileges before a user has signed in for the first time.

Environment

  • macOS
    • terminal

Directions

  1. SSH into computer, or find and add it to Apple Remote Desktop.
  2. Run the following command: dscl . -append /Groups/admin GroupMembership username

Please note: An alternative method is to use the following command, but it will only work on Macs bound to Active Directory (not common)

  • dseditgroup -o edit -a username -t user admin
Print Article

Related Articles (1)

How to add admin privileges on a macOS device using System Preferences.