54 Chapter 7 Working With Users and Groups
Importing Users and Groups
You can use the dsimportexport command to import user and group accounts.
Note: Despite its name, dsimportexport can’t be used to export user records.
The utility is in /Applications/Server/Workgroup Manager.app/Contents/Resources.
For information on the formats of the files you can import, see “Creating a Character-
Delimited User Import File” on page 55.
$ dsimportexport (-g|-s|-p) file directory user password (O|M|I|A) [options]
To import users and groups:
1Create a file containing the accounts to import, and place it in a location accessible
from the importing server. You can export this file from an earlier version of Mac OS X
Server or AppleShare IP 6.3, or create your own character-delimited file. See “Creating a
Character-Delimited User Import File” on page 55.
Open Directory supports up to 100,000 records. For local NetInfo databases, make sure
the file contains no more than 10,000 records.
2Log in as the administrator of the directory domain into which you want to import
accounts.
Parameter Description
-g|-s|-p You must specify one of these to indicate the type of file you’re
importing:
-g for a character-delimited file
-s for an XML file exported from Users & Groups in Mac OS X
Server version 10.1.x
-p for an XML file exported from AppleShare IP version6.x
file The path of the file to import.
directory The path to the Open Directory node where the records will be
added.
user The name of the directory administrator.
password The password of the directory administrator.
O|M|I|A Specifies how user data is handled if a record for an imported user
already exists in the directory:
O: Overwrite the matching record.
M: Merge the records. Empty attributes in the directory assume
values from the imported record.
I: Ignore imported record and leave existing record unchanged.
A: Append data from import record to existing record.
options Additional command options. To see available options, execute the
dsimportexport command with no parameters.
LL2354.book Page 54 Monday, October 20, 2003 9:47 AM