Name Service Switch

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

Operation

A system administrator usually configured NSS using the / etc nsswitch.conf file /. The configuration file lists for resources ( passwd for user, group, for groups, ...) the corresponding data sources. When you execute a query, the order of the specified underlying data sources is crucial. 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 such getpwent or getgrent calls the corresponding functions in the NSS module. By changing based on the Library, existing programs can work together without change with NSS.

History

Earlier Unix-like systems could either use only configuration files or hard-coded rules for resolving configuration queries. Only Ultrix delivered by using the configuration file / etc / svc.conf a nearly identical functionality as NSS.

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

591487
de