Friday, August 25, 2006

Mac OS X Adding a User From the Command Line

  1. Create a new entry in the local (/) domain under the category /users.

    niutil -create / /users/username

  2. Create and set the shell property to bash.

    niutil -createprop / /users/username shell /bin/bash

  3. Create and set the user’s full name.

    niutil -createprop / /users/username realname "User Name"

  4. Create and set the user’s ID.

    niutil -createprop / /users/username uid 503

  5. Create and set the user’s global ID property.

    niutil -createprop / /users/username gid 1000

  6. Create and set the user name on the local domain, as opposed to the network domain or another domain.

    niutil -createprop / /users/username home /Local/Users/username

  7. Make an entry for the password.

    niutil -createprop / /users/username _shadow_passwd

  8. Set the password.

    passwd username

  9. To make that user useful, you might want to add them to the admin group.

    niutil -appendprop / /groups/admin users username

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home