Chapter 8 Managing User and Group Accounts 127
Exporting Users and Groups
To export records from Open Directory use dsexport.
The dsexport tool is in the /usr/bin/ folder.
$ dsexport
filePath
DSNodePath
recordType
options
DSProxy
For example, use the following to export user records from the local Open Directory
server node and store the exported data in the exportedUserRecords.out file:
$ dsexport exportedUserRecords.out /Local/Default dsRecTypeStandard:Users
Use the following to export group records for admin and staff from the LDAPv3 node
on the proxy system (proxy.machine.com) to the exportedGroupRecords.out file:
$ dsexport exportedGroupRecords.out /LDAPv3/127.0.0.1
dsRecTypeStandard:Groups -r admin, staff -a proxy.machine.com
-u diradmin -p pass
Setting Permissions
To control access to your information, Mac OS X sets permissions for disks, folders, and
files. You can only change permissions to items that you own.
Be sure that the default permissions are appropriate. For most purposes, files should be
accessible to other members of your group. If you have private or confidential
information, the default permissions of the files may allow others to see it.
To prevent others from accessing personal information, create a folder and set its
permissions to “owner”; then place your confidential files into it. No other users are
allowed to access the folder.
Parameter Description
filepath
The name (including the path) of the file to export.
DSNodePath
The path to the Open Directory server node to export records from.
recordType
(Optional) The type of record to be exported from the Open Directory server node.
options
Additional command options. To see available options, execute the dsexport
command with no parameters. Also, see the command’s man page.
DSProxy
(Optional) A set of options for connecting to a proxy system. All options are needed.
If you do not specify the password as an argument, the tool prompts you for it.
These options are:
Â
-a proxyAddress: The address of the proxy machine the user wants to use.
Â
-u proxyUser: The username to use for the proxy connection.
Â
-p proxyPassword: The password to use for the proxy connection.
Comments to this Manuals