Mac OS X provides a suite of command-line tools to view and manage the information in Open Directory. The most useful of these tools are:
A general-purpose interactive command-line tool for working with data in any Open Directory data source, including LDAP, NetInfo, SMB, and Bonjour. This tool can also be used in single-shot mode.
An interactive command-line tool for working with data in a NetInfo database. Unlike
dscl, this tool will not work with any other data source. This tool can also be used in single-shot mode.
Extracts data from a NetInfo database into either legacy Unix flat file formats (such as the files found in the
/etc directory) or into a NetInfo-specific raw format.
Loads data from a flat file, either a Unix
/etc format file or a NetInfo raw format file.
A single-shot tool used for reading and writing information to a NetInfo database. You should consider using
nicl in single-shot mode instead of this tool.
Searches through a NetInfo database for directories that match a pattern.
Searches through a NetInfo database for directories or properties that match a particular pattern.
Of these commands, the most useful are
Before you get too creative with your NetInfo database, you should make sure you have a good backup of it. You can create a backup simply by copying the
/var/db/netinfo/local.nidb directory. For example, ...