Mac OS create user

Оригинал взят с http://www.maclife.com/article/columns/terminal_101_creating_new_users

  1. First, we’ll create a new entry for the user under /Users:
    dscl . create /Users/corybohon

  2. Next, we’ll create and set the shell property to bash:

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

  3. Next, we’ll add some user credentials, and set the user’s full name:

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

  4. Now, we’ll create and set a unique ID for the user. Pick whatever works for you here, ensuring that it hasn’t been used by previous users:

    dscl . create /Users/corybohon UniqueID 503

  5. Next, we’ll create and set the user’s group ID property:

    dscl . create /Users/corybohon PrimaryGroupID 1000

  6. Now, we’ll set the user’s home directory by running the following command. Ensure that you replace both instances of the shortname in the command below:

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

  7. Now we’ll add some security to the user account and set their password. Here, you’ll replace “PASSWORD” with the actual password that will be used initially for their account. The user can always change the password later:

    dscl . passwd /Users/corybohon PASSWORD

Make user admin

If the user will have administrator privileges, then we’ll run the following account to assign that title to the newly minted user:

dscl . append /Groups/admin GroupMembership corybohon

And, that’s it. The most simple way to create a user through the command line, and assign all of the OS X account privileges to the new account.

mac_os/create_user.txt · Last modified: 2014/09/28 14:54 by rybario
About this template
CC Attribution-Share Alike 4.0 International
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5