Apple Mac OS X Server Network Card User Manual


 
120 Chapter 8 Working with Users and Groups
Open Directory supports up to 200,000 records. For a local NetInfo directory, make sure
the file contains no more than 10,000 records.
2 Log in as the administrator of the directory domain you want to import accounts into.
3 Use the dsimport tool to import users and groups. For example, to import a file
generated by Workgroup Manager named ”sample” and export it into the LDAPv3
directory located at 192.168.2.2, use the following command:
$ dsimport -g sample /LDAPv3/192.168.2.2 -O -u
diradmin
Replace diradmin with the short name of the directory administrator. When two records
match, the import file will overwrite the matching record.
4 To create home folders for imported users, use createhomedir . See “Creating a User’s
Home Folder” on page 109.
Creating a Character-Delimited User Import File
You can create a character-delimited file by using Workgroup Manager or dsimport to
export accounts in the LDAP directory of an Open Directory master or a NetInfo
domain into a file. You can also create a character-delimited file by hand, using a script,
or by using a database or spreadsheet application.
The first record in the file, the record description, describes the format of each account
record in the file. There are three options for the record description:
 Write a full record description
 Use the shorthand StandardUserRecord
 Use the shorthand StandardGroupRecord
The other records in the file describe user or group accounts, encoded in the format
described by the record description. Any line of a character-delimited file that begins
with # is ignored during importing.
Writing a Record Description
The record description specifies the fields in each record in the character-delimited file,
specifies the delimiting characters, and specifies the escape character that precedes
special characters in a record.
Encode the record description using the following elements in the order specified,
separating them with a space:
 End-of-record indicator (in hex notation)
 Escape character (in hex notation)
 Field separator (in hex notation)
 Value separator (in hex notation)
 Type of accounts in the file (dsRecTypeStandard:Users or
dsRecTypeStandard:Groups)
 Number of attributes in each account record