changeDirData.pl(8) BSD System Manager's Manual changeDirData.pl(8)
NAME
changeDirData.pl -- Mac OS X Server OpenDirectory LDAP find/replace tool
SYNOPSIS
changeDirData.pl [-hiPv] -s server -u diradmin [-p password] -o oldValue
-n newValue -r recordType
DESCRIPTION
changeDirData.pl Searches an Open Directory LDAP server for a specified
value, and replaces it. This is particularly useful for bulk changing
record values when a server hostname or ip number changes.
changeDirData.pl should be run against the Open Directory master -- not
an Open Directory Replica, but the script itself can be run from any
machine on the network.
It is highly recommended that you make a backup of your directory data
(via Server Admin or slapconfig) before making bulk changes.
OPTIONS
The following options are available:
-h prints a usage statement and exits
-i The find and replace operation will be done case insensitively.
mysearchstring will match not only mysearchstring, but also
MYSEARCHSTRING and mYsearchSTring
-v prints more status information as the script runs
-s server
the DNS or IP address of the OD LDAP server
-u username
Username for a directory administrator on the LDAP server
-o oldValue
the value to search for and replace.
-n newValue
the value that will replace the oldValue
-r recordType
comma separated list of record types. For all record types, use
"all". The list of valid record types is: users, groups, people,
mounts, computers, augments, autoserversetup, computer_lists, com-
puter_groups, computer_lists, printers, places, locations, maps,
presets_computers, presets_computer_groups, presets_users, pre-
sets_groups, presets_computer_lists
USAGE
Although .Nm can be used to find and replace any string in any attribute
of your OD LDAP server, it is particularly useful for bulk changing ref-
erences (such as home directory paths, email addresses, sharepoints,
etc.) to your server when its IP or hostname changes. .Nm should be run
after the changeip command has been run on the server that is changing
it's hostname/IP. Note: it is highly recommended that you backup your
Open Directory data via Server Admin or slapconfig before making bulk
changes to your directory.
EXAMPLES
Replace all occurrences in all record types of "blue" with "red" in the
LDAP server hosted at dirserv.example.com:
changeDirData.pl -s dirserv.apple.com -u diradmin -o blue -n red -r all
Replace all occurrences of "oldserver.example.com" with
"newserver.apple.com" case-insensitively on only user and group records
in the LDAP server hosted at dirserv.example.com:
changeDirData.pl -i -s dirserv.apple.com -u diradmin -o
oldserver.example.com -n newserver.apple.com -r users,groups
SEE ALSO
slapconfig(8) changeip(8)
Mac OS X Server 11 December 2008 Mac OS X Server
Mac OS X 10.6Server - Generated Thu Apr 15 07:12:58 CDT 2010
