Importing Users and Groups

You can use dsimport to import user and group accounts. into a folder. The dsimport tool permits logging at three levels with the -lswitch. You can use the dsimport tool to import any number of records from a flexible text–delimited file. See the dsimport man page for more information.

See the Open Directory administration guide for a list of record types and attributes. This guide also describes how to edit permitted attributes for each record type for use in an LDAP folder.

The dsimport tool is located in /usr/bin/.

See “Creating a Character-Delimited User Import File” on page 120 for information about the formats of the files you can import.

$ dsimport (-g-s-p) file path (OMIA) -u user -p password [options]

Parameter

Description

-g-s-p

You must specify one of these to indicate the type of file you’re

 

importing:

 

-gfor a character-delimited file

 

-sfor an XML file exported from Users & Groups in Mac OS X

 

Server version 10.1.x

 

-pfor an XML file exported from AppleShare IP version 6.x

 

 

file

The path of the file to import.

 

 

path

The path to the Open Directory directory domain where the

 

records will be added.

 

 

OMIA

Specifies how user data is handled if a record for an imported user

 

already 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 existing record unchanged.

 

A: Append data from import record to existing record.

 

 

user

The name of the folder administrator.

 

 

password

The password of the folder administrator.

 

 

options

Additional command options. To see available options, execute the

 

dsimport command with no parameters.

 

 

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 120.

Chapter 8 Working with Users and Groups

119

Page 119
Image 119
Apple Mac OS X Server manual Importing Users and Groups, To import users and groups