nss_ldap(5)
π nss_ldap(5) β LDAP nameservice provider π
okay bestie, welcome to nss_ldap(5), the manual page for the PADL nss_ldap module. it's giving directory energy, no cap.
β¨ NAME β¨
nss_ldap β LDAP nameservice provider π
πΈ DESCRIPTION πΈ
okay so the nss_ldap module is a set of C library extensions. the way it works: it lets X.500 and LDAP directory servers be your primary source of name service information. and what even is name service info? typically users, hosts, groups, and other such data that historically lived in flat files or NIS. iconic.
Features of the PADL nss_ldap module? obsessed. it supports both the RFC 2307 and RFC 2307bis schema, has a common implementation across multiple platforms, Kerberos and SSL security, configurable schema mapping, and configuration file compatibility with the pam_ldap(5) module. slay.
Because LDAP is a hierarchical directory service, you can distribute the information in a way that reflects organizational structure. this contrasts with the flat, single domain policy of NIS. LDAP has many of the advantages of NIS+ (security and scalability) without the complexity. main character energy, honestly.
nss_ldap will work alongside existing NIS, NIS+, DNS and flat file name services. more importantly, because it builds as a shared library, it is not necessary to recompile any applications to take advantage of LDAP. periodt.
The present version of nss_ldap supports AIX 4.3.3 and above, FreeBSD 5.1, HP-UX 11i, Linux and Solaris 2.6 and above. Many vendors provide their own LDAP nameservice providers, often also called nss_ldap.
This manual page applies to the PADL nss_ldap module only. If you are using a vendor provided module, consult the relevant documentation instead. π
The features supported by the version of nss_ldap depend on which flags were enabled when the software was built. Most features are enabled in the configuration file, described below. (The location of the configuration file is configurable at compile time; the default path is /etc/ldap.conf.) Also, some features may be unavailable on certain operating systems or with certain LDAP libraries. For more information, consult your vendor.
π οΈ CONFIGURATION π οΈ
nss_ldap stores its configuration in the ldap.conf file, the location of which is configurable at compile time. (It should be noted that some LDAP client libraries, such as OpenLDAP, also use a configuration file of the same name. nss_ldap supports many of the same configuration file options as OpenLDAP, but it adds several that are specific to the functionality it provides. Additionally, it is not guaranteed that nss_ldap will continue to match the configuration file semantics of OpenLDAP. You may wish to use different files.)
Configuration file options consist of a keyword followed by a space and any arguments. The following options are supported by both nss_ldap and the PADL pam_ldap module:
host <name:port ...>β Specifies the name(s) or IP address(es) of the LDAP server(s) to connect to. In the case thatnss_ldapis used for host name resolution, each server should be specified as an IP address or name that can be resolved without using LDAP. Multiple servers may be specified, each separated by a space. The failover time depends on whether the LDAP client library supports configurable network or connect timeouts (seebind_timelimitbelow). πbase <base>β Specifies the default base distinguished name (DN) to use for searches. πuri <ldap[is]://[name[:port]] ...>β For LDAP client libraries that support it, specifies the URI(s) of the LDAP server(s) to connect to. The URI scheme may beldap,ldapi, orldaps, specifying LDAP over TCP, IPC and SSL respectively. If applicable, a port number can be specified; the default port number for the selected protocol is used if omitted. This option takes precedence over thehostoption; it is not possible to combine the two. β¨ldap_version <version>β Specifies the version of the LDAP protocol to use. Presentlyversionmust be2or3. The default is to use the maximum version supported by the client library. π₯binddn <binddn>β Specifies the distinguished name with which to bind to the directory server(s). This option is optional; the default is to bind anonymously. πbindpw <bindpw>β Specifies the cleartext credentials with which to bind. This option is only applicable when used withbinddnabove. The default is no credential (anonymous bind). When binding to the directory using SASL or other authentication mechanisms apart from simple binds, this option is not used. πrootbinddn <binddn>β This option has the same syntax and effect as thebinddnoption above, except it applies when the effective user ID is zero. If not specified, then the identity specified inbinddnis used instead. Because the configuration file may be readable by many users, the root bind DN credentials are stored in theldap.secretfile instead. This file is usually in the same directory as the configuration file. πport <port>β Specifies the port to connect to; this option is used with thehostoption, and is ignored with theurioption. π¦scope <sub|one|base>β Specifies the search scope (subtree, one level or base object). The default scope is subtree; base scope is almost never useful for nameservice lookups. πderef <never|searching|finding|always>β Specifies the policy for dereferencing aliases. The default policy is to never dereference aliases. π§timelimit <timelimit>β Specifies the time limit (in seconds) to use when performing searches. A value of zero (0), which is the default, is to wait indefinitely for searches to be completed. βbind_timelimit <timelimit>β Specifies the time limit (in seconds) to use when connecting to the directory server. This is distinct from the time limit specified intimelimitand affects the initial server connection only. (Server connections are otherwise cached.) Only some LDAP client libraries have the underlying functionality necessary to support this option. The default bind timelimit is30seconds. πΈreferrals <yes|no>β Specifies whether automatic referral chasing should be enabled. The default behaviour is specified by the LDAP client library. πrestart <yes|no>β Specifies whether the LDAP client library should restart theselect(2)system call when interrupted. This feature is not supported by all client libraries. π«Άlogdir <directory>β Specifies the directory used for logging by the LDAP client library. This feature is not supported by all client libraries. πdebug <level>β Specifies the debug level used for logging by the LDAP client library. This feature is not supported by all client libraries, and does not apply to thenss_ldapandpam_ldapmodules themselves (debugging, if any, is configured separately and usually at compile time). πssl <on|off|start_tls>β Specifies whether to use SSL/TLS or not (the default is not to). Ifstart_tlsis specified then StartTLS is used rather than raw LDAP over SSL. Not all LDAP client libraries support both SSL and StartTLS, and all related configuration options. πsslpath <cert7_path>β For the Netscape and Mozilla LDAP client libraries only, this specifies the path to the X.509 certificate database. πtls_checkpeer <yes|no>β Specifies whether to require and verify the server certificate or not, when using SSL/TLS with the OpenLDAP client library. The default is to use the default behaviour of the client library; for OpenLDAP 2.0 and earlier it is"no", for OpenLDAP 2.1 and later it is"yes". At least one oftls_cacertdirandtls_cacertfileis required if peer verification is enabled. πtls_cacertdir <certificate_dir>β Specifies the directory containing X.509 certificates for peer authentication. πtls_cacertfile <certificate_file>β Specifies the path to the X.509 certificate for peer authentication. β¨tls_randfile <entropy_file>β Specifies the path to an entropy source. π¦tls_ciphers <ciphers>β Specifies the ciphers to use for TLS. See your TLS implementation's documentation for further information. π₯tls_cert <certificate_file>β Specifies the path to the file containing the local certificate for client TLS authentication. πtls_key <key_file>β Specifies the path to the file containing the private key for client TLS authentication. π
The following configuration options apply to nss_ldap only:
bind_policy <hard_open|hard_init|soft>β Specifies the policy to use for reconnecting to an unavailable LDAP server. The default ishard_open, which reconnects if opening the connection to the directory server failed. By contrast,hard_initreconnects if initializing the connection failed. Initializing may not actually contact the directory server, and it is possible that a malformed configuration file will trigger reconnection. Ifsoftis specified, thennss_ldapwill return immediately on server failure. All "hard" reconnect policies block with exponential backoff before retrying. πnss_connect_policy <persist|oneshot>β Determines whethernss_ldappersists connections. The default is for the connection to the LDAP server to remain open after the first request. π«Άidle_timelimit <timelimit>β Specifies the time (in seconds) after whichnss_ldapwill close connections to the directory server. The default is not to time out connections. πΈsasl_authid <authid>β Specifies the authorization identity to be used when performing SASL authentication. πrootsasl_auth_id <authid>β Specifies the authorization identity to be used when performing SASL authentication as root (when the effective user ID is zero). πsasl_secprops <properties>β Specifies Cyrus SASL security properties. Allowed values are described in theldap.conf(5)manual page. π§rootuse_sasl <yes|no>β Specifies whether SASL authentication should be used when the effective user ID is zero. βkrb5_ccname <PREFIX:args>β Ifnss_ldapis built with configurable GSS-API credentials cache name support, specifies the Kerberos credentials cache to use. π₯nss_paged_results <yes|no>β Enables support for paged results. β¨pagesize <pagesize>β when paged results are turned on (peep the βsee aboveβ moment, bestie), this says how many entries come back in one single page. Default is1000. πnss_base_<map> <basedn?scope?filter>β sets the search base, scope, and filter for specific maps. Real talk: the map is literally part of the config file keyword, and itβs one ofpasswd,shadow,group,hosts,services,networks,protocols,rpc,ethers,netmasks,bootparams,aliasesandnetgroup. The syntax forbasednandscopeis the same as the config file options of the same name, plus you can omit the trailing suffix of the base DN β and if you do, the global base DN gets appended instead. The filter is a search filter that gets added to the default search filter for that specific map, so the effective filter is the logical intersection of the two. The base DN, scope, and filter are separated with literal question marks (?) exactly like that, because compatibility with the DUA configuration profile schema and theldapprofiletool. This option can be specified multiple times. π¦nss_map_attribute <from_attribute> <to_attribute>β can be specified multiple times, and it tellsnss_ldapto use the attributeto_attributeinstead of the RFC 2307 attributefrom_attributein all lookups. Ifnss_ldapwas built without schema mapping support, this option is ignored. πnss_map_objectclass <from_objectclass> <to_objectclass>β can be specified multiple times, and it tellsnss_ldapto use the object classto_objectclassinstead of the RFC 2307 object classfrom_objectclassin all lookups. Ifnss_ldapwas built without schema mapping support, this option is ignored. β¨nss_default_attribute_value <attribute> <value>β sets the default value to use for entries that lack the specified attribute. Can be specified multiple times, for different attributes. Ifnss_ldapwas built without schema mapping support, this option is ignored. πΈnss_override_attribute_value <attribute> <value>β sets a value to use for the specified attribute, and it wins over whatever is in the actual entry. Can be specified multiple times, for different attributes. Ifnss_ldapwas built without schema mapping support, this option is ignored. π₯nss_schema <rfc2307bis|rfc2307>β if the value isrfc2307bis, then support for the RFC2307bis schema (distinguished names in groups) gets enabled. πnss_initgroups <backlink>β this tells thenss_ldapimplementation ofinitgroups(3)to figure out a userβs group membership by reading thememberOfattribute of their directory entry (and any nested groups) instead of querying onuniqueMember. This can give increased performance with certain directory servers that have peculiar indexing configurations. If RFC2307bis support is disabled, this option is ignored. π§nss_initgroups_ignoreusers <user1,user2,...,userN>β this tells thenss_ldapimplementation ofinitgroups(3)to returnNSS_STATUS_NOTFOUNDif itβs called with a listed user as its argument. πnss_getgrent_skipmembers <yes|no>β says whether or not to populate the members list in the group structure for group lookups. If you have very large groups, turning this on will greatly increase performance, but at the cost of some lost functionality. You should verify that no local applications rely on this information before enabling this on a production system. β οΈnss_srv_domain <domain>β this determines the DNS domain used for performing SRV lookups. π
π AUTHOR π
The nss_ldap module was developed by PADL Software Pty Ltd (www.padl.com). π
π FILES π
/etc/ldap.conf/etc/ldap.secret/etc/nsswitch.conf
π SEE ALSO π
nsswitch.conf(5) β go give it a read, bestie, itβs right there. π«Ά
and thatβs the whole nss_ldap(5) manual page, no date on this footer, just nss_ldap(5), and honestly? timeless. π
β¨π
π¦ where this page comes from
- ubuntu jammy: libnss-ldap 265-5ubuntu2
- ubuntu noble: libnss-ldap 265-5ubuntu3
- Copyright 1997-2005 Luke Howard."
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms