Using createhomedir to create home directories – Apple Mac OS X Server (version 10.2.3 or later) User Manual
Page 165

Users and Groups
165
Using createhomedir to Create Home Directories
You can use the createhomedir command-line tool to create AFP or NFS home directories for
one or more users on the server where you run 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]
where
-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:
1
Log in to the server on which you want the home directories to reside.
2
Open the Terminal application.
3
At the prompt, type “sudo -s” or “su root” and press Return. Enter the root password if
prompted.
Type the createhomedir command. The createhomedir tool is located in /usr/sbin. The
following command creates a home directory for a user with the short name “steve” who has
an account in the shared directory domain named “/NetInfo/root”:
createhomedir -n /NetInfo/root -u steve
This command creates home directories for all users defined in all directory domains of the
server’s search path if they don’t already exist:
createhomedir -a
LL0395.Book Page 165 Wednesday, November 20, 2002 11:44 AM