122

Matt Mitchell:/bin/tcsh

As these examples illustrate, you can use the prefix dsAttrTypeStandard: when referring to an attribute, or you can omit the prefix. When you use Workgroup Manager to export character-delimited files, it uses the prefix in the generated file.

When importing user passwords, you can insert the following in the list of attributes to set the user’s password type to Open Directory:

dsAttrTypeStandard:AuthMethod

The method for setting an imported user’s password type to Open Directory requires that the imported data actually have a password value. If the password value is missing for a user, then the corresponding user record will be created with a password type of Crypt or Shadow Password.

Then, insert the following in the formatted record (in this example, the user ‘s password is “password”):

dsAuthMethodStandard\:dsAuthClearText:password

Note: In this example, the colon (:) is the field separator. Because there is a colon in the description for this attribute, the escape character must be used to indicate that the colon should not be treated as a delimiter. The backslash (\) is the escape character in this example. If the field separator is anything other than the colon, the escape character is not needed.

Using the StandardUserRecord Shorthand

When the first record in a character-delimited import file contains StandardUserRecord, the following record description is assumed:

0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 7

RecordName Password UniqueID PrimaryGroupID

RealName NFSHomeDirectory UserShell

An example user account looks like this:

anne:Adl47E$:408:20:A. Johnson, M.D.:/Network/Servers/somemac/Homes/anne:/

bin/csh

Using the StandardGroupRecord Shorthand

When the first record in a character-delimited import file contains StandardGroupRecord, the following record description is assumed:

0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Groups 4 RecordName Password PrimaryGroupID GroupMembership

The following is an example of a record encoded using the description:

students:Ad147:88:johnson,miller,clark,chen,wong

Chapter 8 Working with Users and Groups

Page 122
Image 122
Apple Mac OS X Server manual Using the StandardUserRecord Shorthand, An example user account looks like this