## 3.11. 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 | Important properties | Wired into Directory Services?
--- | --- | --- | ---
/etc/exports | /exports | name, clients (list), opts (list) | No
/etc/fstab | /mounts | name, dir, type, opts (list), passno, freq | Yes
/etc/group | /groups | name, passwd, gid, users (list) | Yes
/etc/hosts | /machines | ip_address, name (list) | Yes
/etc/mail/aliases | /aliases | name, members (list) | No
/etc/networks | /networks | name (list), address | No
/etc/passwd, /etc/master.passwd | /users | name, passwd, uid, gid, realname, home, shell | Yes
/etc/printcap | /printers | name, and various printcap properties (see the printcap(5) manpage) | No
/etc/protocols | /protocols | name (list), number | No
/etc/rpc | /rpcs | name (list), number | No
/etc/services | /services | name (list), port, protocol (list) | No

Copyright © 2003 O'Reilly & Associates. All rights reserved.