Name service switch

from Wikipedia, the free encyclopedia

The Name Service Switch (NSS) stands for an interface made of software for combining fundamentally different data sources using modules.

In Unix-like operating systems , the NSS allows the configuration of various data sources for resolving configuration data (including hosts, users and groups). It is possible to add databases (such as LDAP , MySQL ) to the local configuration files (for example / etc / passwd, / etc / group, ...) .

functionality

A system administrator typically configures NSS using the /etc/nsswitch.conf file . The file lists the corresponding data sources for configuration resources (passwd for users, group for groups, ...). When executing a search query, the order of the data sources specified behind it is decisive. A configuration could look like this:

passwd: files ldap
shadow: files ldap
group: files ldap
hosts: files ldap

Implementation in the C library

NSS is implemented in the standard C library , so that functions like getpwent or getgrent call the corresponding functions in the NSS module. By making changes based on the library, existing programs can work together with NSS without change.

history

Earlier Unix-like systems could only use configuration files or hard-coded rules to resolve configuration queries. Only Ultrix provided almost identical functionality to NSS by using the configuration file /etc/svc.conf .

Sun Microsystems developed NSS for its Solaris operating system , but gradually ported programmers NSS for a variety of other operating systems such as FreeBSD , NetBSD , Linux , HP-UX , IRIX and AIX .

See also

Web links