5.10. Flat Files and Their Directory Services Counterparts

 < Day Day Up > 

As mentioned earlier, Directory Services manages 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 Directory Services to manage this information. You can use niload with a supported flat file format to add entries, or you can use dscl or NetInfo Manager to directly manipulate the entries. Table 5-2 lists each flat file, the corresponding portion of the directory, and important properties associated with each entry. See the netinfo(5) manpage for complete details. Properties marked with (list) can take multiple values using the dscl merge command (for an example, see "Adding Users to a Group," earlier in this chapter.)

The "Flat files or local database?" column in Table 5-2 indicates whether Directory Services consults the flat file, the local database, or both. You can use Directory Access to modify the way information is looked up on your Macintosh.

Table 5-2. Flat files and their NetInfo counterparts

Flat file

NetInfo directory

Important properties

Flat files or local database?

/etc/exports

/exports

name, clients (list), opts (list)

Flat files

/etc/fstab

/mounts

name, dir, type, opts (list), passno, freq

Local database

/etc/group

/groups

name, passwd, gid, users (list)

Local database

/etc/hosts

/machines

ip_address, name (list)

Both; entries in /etc/hosts take precedence

/etc/mail/aliases

/aliases

name, members (list)

Flat files

/etc/networks

/networks

name (list), address

Flat files

/etc/passwd, /etc/ master.passwd

/users

name, passwd, uid, gid, realname, home, shell

Local database

/etc/printcap

/printers

name, and various printcap properties (see the printcap(5) manpage)

Flat files

/etc/protocols

/protocols

name (list), number

Flat files

/etc/rpc

/rpcs

name (list), number

Flat files

/etc/services

/services

name (list), port, protocol (list)

Flat files


     < Day Day Up > 


    Mac OS X Tiger for Unix Geeks
    Mac OS X Tiger for Unix Geeks
    ISBN: 0596009127
    EAN: 2147483647
    Year: 2006
    Pages: 176

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