Specifications
Chapter 8 Managing User and Group Accounts 123
To import users and groups:
1 Create 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 123.
Open Directory supports up to 200,000 records.
2 Log in as the administrator of the directory domain you want to import accounts into.
3 Use the dsimport tool to import users and groups.
For example, to import a file generated by Workgroup Manager named “sample” and
export it into the LDAPv3 directory located at 192.168.2.2, use the following command:
$ dsimport -g sample /LDAPv3/192.168.2.2 -O -u
diradmin
Replace diradmin with the short name of the directory administrator. When two records
match, the import file overwrites the matching record.
4 To create home folders for imported users, use createhomedir.
See “Creating a User’s Home Folder” on page 109.
Creating a Character-Delimited User Import File
You can create a character-delimited file by using Workgroup Manager or dsimport to
export accounts in the LDAP directory of an Open Directory master. You can also create
a character-delimited file by hand, using a script, or by using a database or spreadsheet
application.
DSNodePath
The path to the Open Directory server node where the imported records will be
added.
O|M|I|A|N Specifies how user data is handled if a record for an imported user exists in the
folder:
Â
O: Overwrite the matching record.
Â
M: Merge the records. Empty attributes in the folder and assume values from
the imported record.
Â
I: Ignore imported record and leave the record unchanged.
Â
A: Append data from an import record to an existing record.
Â
N: Do not check for duplicates.
user
The name of the Open Directory domain administrator.
password
The password of the Open Directory domain administrator.
options
Additional command options. To see available options, execute the dsimport
command with no parameters.
Parameter Description