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. A comment line is ignored by routines that search the file.

Characters preceding a 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 


Comment line. 

# hosts: nisplus [NOTFOUND=return] files 

Interpreted line. 

hosts: nisplus [NOTFOUND=return] file 

Partially interpreted line. The files element is not interpreted.

hosts: nisplus [NOTFOUND=return] # files