Specifications

126 Chapter 8 Managing User and Group Accounts
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.
The method for setting an imported users password type to Open Directory requires
that the imported data has a password value. If the password value is missing for a
user, the corresponding user record is created with a password type of Crypt or
Shadow Password.
Before importing user accounts, remember to manually set passwords or set default
passwords to a known value. After importing user records, you can set up a password
policy that requires users to change their password at first login.
Note: Importing passwords generally works only if the password is a plain text string in
the import file. Additionally, you need to set the AuthMethod attribute so that
dsimport can import the password. Encrypted passwords that are in hash format in the
import file cannot be recovered. Also, passwords cannot be exported using Workgroup
Manager or any other method.
Using 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. Lo, M.D.:/Network/Servers/somemac/Homes/anne:/bin/csh
Using 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