Mac OS X Server: How to Format User Information For Password Server

If you want to use Password Server (rather than Basic) and need to import users from a separate file, format the user information as described in this document.
Pages 191-193 of Server Admin Guide v 10.2.3 discuss creating an import file with record descriptions. An example on page 192 shows how to import users who use the Password Server.

A record description identifies the fields in each record you want to import from a character-delimited file; it indicates how records, fields, and values are separated; and it describes the escape character that precedes special characters in a record. Encode the record description using the following elements in the order specified, separating them using a space:

When importing user passwords, you can insert the following in the list of attributes to set the user's password service to the Password Server:

dsAttrTypeStandard:AuthMethod

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. As there is a colon in the description for this attribute, the escape character must be used to indicate 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.

This is an example of a header from a standard users import file with users who use the Password Server. It must be typed as one line of text in which the elements are separated by spaces and without line breaks, as presented here. Though your browser will wrap the text for presentation, you can see that it contains no line breaks if you copy and paste it into a text editor that has wrapping turned off:

0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 8 dsAttrTypeStandard:RecordName dsAttrTypeStandard:AuthMethod dsAttrTypeStandard:Password dsAttrTypeStandard:UniqueID dsAttrTypeStandard:PrimaryGroupID dsAttrTypeStandard:Comment dsAttrTypeStandard:RealName dsAttrTypeStandard:UserShell

This is an example of a formatted record with the following attributes and values:

<Attribute>: <Value>
Record Name (short name): tuser
Authentication Method: dsAuthClearText
Password: password1
Unique ID: 1242
Primary Group ID: 20
Comment: <blank>
Real Name (long name): Terri User
User Shell: /bin/tcsh

tuser:dsAuthMethodStandard\\:dsAuthClearText:password1:1242:20::Terri User:/bin/tcsh


Note: This example also uses the colon (:) as the field separator and the backslash (\\) as the escape character.
Published Date: Oct 7, 2016