So I need to add an admin account to multiple macs remotely. All of these macs already have an admin account (so we want to add an additional admin account) and they are bound to AD (worth mentioning just in case that makes a difference).

My question is, how can I add an extra admin account remotely? Anyone have a script? Maybe to do it with Apple Remote Desktop? SSH into these computers(since we already have an admin account) and just try to add the extra account that way?

What do you guys suggest? Thanks!

2 Answers 2


You are looking for the dscl command. You can do it through ARD unix command to multiple machines at once, or send via ssh per machine. There's lots of discussion and great information here - What steps are needed to create a new user from the command line?

To summarize those answers, here's a quick admin user addition.

dscl . create /Users/corybohon

dscl . create /Users/corybohon UserShell /bin/bash

dscl . create /Users/corybohon RealName "Cory Bohon"

dscl . create /Users/corybohon UniqueID 503

dscl . create /Users/corybohon PrimaryGroupID 1000

dscl . create /Users/corybohon NFSHomeDirectory /Local/Users/corybohon

dscl . passwd /Users/corybohon PASSWORD

dscl . append /Groups/admin GroupMembership corybohon

A logout or restart will be needed for the user to show as admin in the System Preferences.

On a side note, I am not sure if this still works with Yosemite, but MagerVelp has a app called "CreateUserPkg" that can be used to deploy users. CreateUserPkg, I use it with our MDM solution to push users as a pkg.

Terminal 101 full guide from above.

  • thank you @tron_jones for your answer. That pretty much worked..however...I cannot log in to the account. I am on AD and this computer has Filevault turned on just in case that matters but when I put in the password it doesn't work. Also when i checked there was no home directory like there was for the rest of the users on said machine. Aug 12, 2015 at 17:13
  • Hmm. Just ran the above on a machine running 10.10.4 and it worked perfectly and logged in with user home folder, also bound to AD.
    – tron_jones
    Aug 12, 2015 at 17:41
  • Wait I found this online and now it works. After the above commands I run this....cp -R /System/Library/User\ Template/English.lproj /Users/corybohon and then chown -R corybohon:staff /Users/corybohon and now it works. I am on 10.10.1 they said to create home directory...why would it be here is the link to that thread just in case: serverfault.com/questions/20702/… Aug 12, 2015 at 17:44

If the admin account you're trying to add is an AD one, you should be able to give it admin rights through Directory Utility.

Step 7b here shows how to do it: http://www.techrepublic.com/blog/apple-in-the-enterprise/integrate-macs-into-a-windows-active-directory-domain/

[Open Directory Utility]

Double-click Active Directory,


click on the arrow to unhide the Advanced Options,


select Administrative.


Checking "Allow administration by" will allow nodes to be managed by the administrator(s) who's responsible for overseeing systems, based on security group membership or user account(s)

This at least saves you trying to remember to change the password on each individual machine (or trying to remember the password you used 6 passwords before the current one) every time you have to.

[Edit: missed the request for being able to do it remotely, but may be able to get this pushed as a policy through AD?]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .