Section 10.5. Directory Services Utilities

10.5. Directory Services Utilities

This chapter demonstrates four Directory Services utilities : dscl , nireport , nidump , and niload . Table 10-1 describes these and other NetInfo utilities.

Table 10-1. NetInfo tools

Tool

Description

dscl

Provides a command-line interface to Directory Services.

nicl

Provides a command-line interface to NetInfo.

nidump

Extracts flat file format data (such as /etc/passwd ) from NetInfo.

nifind

Finds a NetInfo directory.

nigrep

Performs a regular expression search on NetInfo.

niload

Loads flat file format data (such as /etc/passwd ) into NetInfo.

nireport

Prints tables from NetInfo.

niutil

NetInfo utility for manipulating the database.


The nidump and nireport utilities display the contents of the local directory. niload loads the contents of flat files (such as /etc/passwd or /etc/ hosts ) into Directory Services. niutil directly manipulates the Directory Services database; it's the command-line equivalent of NetInfo Manager. To make changes, use sudo with these commands or first log in as the root user. The commands that can be performed as a normal user are shown without the sudo command in the examples that follow.

Unlike other ni* utilities, nicl acts directly on the database files. Consequently, you can use nicl to modify the local directory even when Directory Services is not running (such as when you boot into single-user mode).

When you use any of these utilities you are making potentially dangerous changes to your system. But even if you trash the local directory with reckless usage of these commands, you can restore the NetInfo database from your last backup. For more details, see "Restoring the Directory Services Database," later in this chapter. To back up the local NetInfo database, use the command:

 $  nidump -r / -t localhost/local > backup.nidump  




MAC OS X Tiger in a Nutshell
Mac OS X Tiger in a Nutshell: A Desktop Quick Reference (In a Nutshell (OReilly))
ISBN: 0596009437
EAN: 2147483647
Year: 2003
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net