Mac OS X Server: How to Use createhomedir Command to Create Home Directories

This document explains how to use the createhomedir command-line tool to create home directories.
You can use the createhomedir command-line tool to create home directories for one or more users on the server on which you use the tool. Here are the parameters that createhomedir accepts. Parameters are delimited using angle brackets (<>) if they are required, and square brackets ([]) if they are optional:

createhomedir <-a or -l or -n directoryDomainName> [-u userName]

The flags have these effects:

-a

Creates home directories for users defined in all directory domains of the server's search path.

-l

Creates home directories for users defined in the local directory domain.

-n directoryDomainName 

Creates home directories for users defined in a specific directory domain in the server's search path.

-u userName 

Creates a home directory for a specific user defined in the domain(s) identified in the -a, -l, or -n parameter. The userName value must be a short name assigned to the user. If you omit the -a, -l, and -n parameters when you use the -u parameter, -a is assumed.

To use createhomedir to create home directories:

The following examples creates a home directory for a user with the short name "ichiro" who has an account in the shared directory domain "/NetInfo/root":

createhomedir -n /NetInfo/root -u ichiro

This command creates Home directories for all users defined in all directory domains of the server's search path if they do not already exist:

createhomedir -a

Note: Apple does not offer free telephone support for the use of this command line tool.
Published Date: Oct 11, 2016