System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

Comments in nsswitch.conf Files

Any nsswitch.conf file line beginning with a comment character (#) is interpreted as a comment line and is ignored by routines that search the file.

When a comment character (#) is included in the middle of the line, characters preceding the comment mark are interpreted by routines that search the nsswitch.conf file. Characters to the right of the comment mark are interpreted as comments and ignored.

Table 2–4 Switch File Comment Examples

Type of Line 

Example 

Comment line (not interpreted). 

# hosts: nisplus [NOTFOUND=return] files 

Fully interpreted line. 

hosts: nisplus [NOTFOUND=return] file 

Partially interpreted line (the files element not interpreted)

hosts: nisplus [NOTFOUND=return] # files