Note: This web site is only kept up to date for OSG Software 1.2 (VDT 2.0.0). If you are looking for information for the most recent release, the RPM-based OSG Software 3.0, please see the OSG documentation web site

Using NetInfo on Mac OS X

Possible Update

No netinfo in Mac OS X 10.5 (Leopard)? More details

Mac OS X uses the NetInfo system for storing directory information about system resources, including users. Therefore, to perform basic system administration tasks, you must use the NetInfo system instead of more traditional *nix administrative utilities.

Create a New User

This procedure was adapted from Apple documentation and other readings on NetInfo for Mac OS X:

  1. Create a new entry in the local (/) domain under the category /users
    niutil -create / /users/<username>
  2. Set the user's basic account properties (UID, default group ID, shell, home directory, and real name)
    niutil -createprop / /users/<username> uid <uid>
    niutil -createprop / /users/<username> gid <uid>
    niutil -createprop / /users/<username> shell /bin/bash
    niutil -createprop / /users/<username> home /Users/<username>
    niutil -createprop / /users/<username> realname "User Name"
  3. Create a group matching the user's name
    niutil -create / /groups/<username>
    niutil -createprop / /groups/<username> gid <uid>
    niutil -createprop / /groups/<username> users <username>
  4. Create the user's home directory
    mkdir -p /Users/<username>
    chown <username>:<username> /Users/<username>
  5. Set the user's password
    niutil -createprop / /users/<username> _shadow_passwd
    passwd <username>
  6. If appropriate, add the user to the admin group
    niutil -appendprop / /groups/admin users <username>