O'Reilly logo

Mac OS X for Unix Geeks by Brian Jepson, Ernest E. Rothman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Flat Files and Their NetInfo Counterparts

As was mentioned earlier, NetInfo managed information for several flat files in earlier releases of Mac OS X, including /etc/printcap, /etc/mail/aliases, /etc/protocols, and /etc/services. For a complete list of known flat file formats, see the nidump and niload manpages.

Although you can edit these flat files directly as you would on any other Unix system, you can also use NetInfo to manage this information. You can use niload with a supported flat file format to add entries to NetInfo, or you can use nicl or NetInfo Manager to directly manipulate the entries. Table 3-2 lists each flat file, the corresponding portion of the NetInfo directory, and important properties associated with each entry. See the netinfo(5) manpage for complete details. Properties marked with (list) can take multiple values. (For an example, see Section 3.7.3, earlier in this chapter).

The “Wired into Directory Services?” column in Table 3-2 indicates whether Directory Services will consult the flat file when the BSD configuration files plug-in is enabled. In some cases, an operating system daemon may bypass Directory Services and consult a flat file, and Directory Services then has no knowledge of the flat file. For example, nfsd can consult either Directory Services or /etc/exports, but if it uses the flat file, it is consulting it directly and is not going through Directory Services.

Table 3-2. Flat files and their NetInfo counterparts

Flat file

NetInfo directory ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required