3Open the Terminal application and type the dsimportexport command. The tool is located in /Applications/Utilities/Workgroup Manager.app/Contents/Resources.

To include the space in the path name, precede it with a backslash (\). For example:

/Applications/Utilities/Workgroup\ Manager.app/Contents/Resources

/dsimportexport -h

4If you want, use the createhomedir tool to create home directories for imported users. See “Creating a User’s Home Directory” on page 63.

Creating a Character-Delimited User Import File

You can 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

List of attributes

For user accounts, the list of attributes must include the following, although you can omit UID and PrimaryGroupID if you specify a starting UID and a default primary group ID when you import the file:

RecordName (the user’s short name)

Password

UniqueID (the UID)

PrimaryGroupID

RealName (the user’s full name)

Chapter 7 Working With Users and Groups

55

Page 55
Image 55
Apple oxs manual Creating a Character-Delimited User Import File, Writing a Record Description, DSRecTypeStandardGroups