Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP
Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP
4
®
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?
ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Diversity and Inclusion
Oracle is fully committed to diversity and inclusion. Oracle recognizes the influence of ethnic and cultural values and is working to remove language from our products and
documentation that might be considered insensitive. While doing so, we are also mindful of the necessity to maintain compatibility with our customers' existing technologies and the
need to ensure continuity of service as Oracle's offerings and industry standards evolve. Because of these technical constraints, our effort to remove insensitive terms is an ongoing,
long-term process.
Référence: E61012
Copyright © 2002, 2020, Oracle et/ou ses affiliés.
Ce logiciel et la documentation qui l'accompagne sont protégés par les lois sur la propriété intellectuelle. Ils sont concédés sous licence et soumis à des restrictions d'utilisation et
de divulgation. Sauf stipulation expresse de votre contrat de licence ou de la loi, vous ne pouvez pas copier, reproduire, traduire, diffuser, modifier, accorder de licence, transmettre,
distribuer, exposer, exécuter, publier ou afficher le logiciel, même partiellement, sous quelque forme et par quelque procédé que ce soit. Par ailleurs, il est interdit de procéder à toute
ingénierie inverse du logiciel, de le désassembler ou de le décompiler, excepté à des fins d'interopérabilité avec des logiciels tiers ou tel que prescrit par la loi.
Les informations fournies dans ce document sont susceptibles de modification sans préavis. Par ailleurs, Oracle Corporation ne garantit pas qu'elles soient exemptes d'erreurs et vous
invite, le cas échéant, à lui en faire part par écrit.
Si ce logiciel, ou la documentation qui l'accompagne, est livré sous licence au Gouvernement des Etats-Unis, ou à quiconque qui aurait souscrit la licence de ce logiciel pour le
compte du Gouvernement des Etats-Unis, la notice suivante s'applique :
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware,
and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer
software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the
use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system,
integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other
Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government's use of Oracle cloud
services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government.
Ce logiciel ou matériel a été développé pour un usage général dans le cadre d'applications de gestion des informations. Ce logiciel ou matériel n'est pas conçu ni n'est destiné à
être utilisé dans des applications à risque, notamment dans des applications pouvant causer un risque de dommages corporels. Si vous utilisez ce logiciel ou matériel dans le cadre
d'applications dangereuses, il est de votre responsabilité de prendre toutes les mesures de secours, de sauvegarde, de redondance et autres mesures nécessaires à son utilisation dans
des conditions optimales de sécurité. Oracle Corporation et ses affiliés déclinent toute responsabilité quant aux dommages causés par l'utilisation de ce logiciel ou matériel pour des
applications dangereuses.
Oracle et Java sont des marques déposées d'Oracle Corporation et/ou de ses affiliés. Tout autre nom mentionné peut correspondre à des marques appartenant à d'autres propriétaires
qu'Oracle.
Intel et Intel Inside sont des marques ou des marques déposées d'Intel Corporation. Toutes les marques SPARC sont utilisées sous licence et sont des marques ou des marques
déposées de SPARC International, Inc. AMD, Epyc, et le logo AMD sont des marques ou des marques déposées d'Advanced Micro Devices. UNIX est une marque déposée de The
Open Group.
Ce logiciel ou matériel et la documentation qui l'accompagne peuvent fournir des informations ou des liens donnant accès à des contenus, des produits et des services émanant de
tiers. Oracle Corporation et ses affiliés déclinent toute responsabilité ou garantie expresse quant aux contenus, produits ou services émanant de tiers, sauf mention contraire stipulée
dans un contrat entre vous et Oracle. En aucun cas, Oracle Corporation et ses affiliés ne sauraient être tenus pour responsables des pertes subies, des coûts occasionnés ou des
dommages causés par l'accès à des contenus, produits ou services tiers, ou à leur utilisation, sauf mention contraire stipulée dans un contrat entre vous et Oracle.
Accessibilité de la documentation
Pour plus d'informations sur l'engagement d'Oracle pour l'accessibilité de la documentation, visitez le site Web Oracle Accessibility Program, à l'adresse : http://www.oracle.com/
pls/topic/lookup?ctx=acc&id=docacc.
Accès aux services de support Oracle
Les clients Oracle qui ont souscrit un contrat de support ont accès au support électronique via My Oracle Support. Pour plus d'informations, visitez le site http://www.oracle.com/
pls/topic/lookup?ctx=acc&id=info ou le site http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs si vous êtes malentendant.
Contents
5
Contents
6 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Contents
7
Contents
Glossary .......................................................................................................... 139
Index ................................................................................................................ 141
8 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Using This Documentation
■ Overview – Describes the LDAP naming service, methods for planning its use, and steps to
implement LDAP.
■ Audience – Technicians, system administrators, and authorized service providers.
■ Required knowledge – Familiarity with concepts and terminologies related to LDAP.
Feedback
Provide feedback about this documentation at http://www.oracle.com/goto/docfeedback.
The Lightweight Directory Access Protocol (LDAP) is the secure network protocol used to
access directory servers for distributed naming and other directory services. This standards-
based protocol supports a hierarchical database structure. You can use this protocol to provide
naming services in both UNIX and multiplatform environments. This chapter covers the
following topics:
■ “Overview of the LDAP Naming Service” on page 11
■ “LDAP Commands” on page 13
For a description of the example IP addresses used in this guide, see the “IP address” entry in
“LDAP Glossary” on page 139.
Oracle Solaris supports LDAP on Oracle Unified Directory (OUD) and OpenLDAP directory
servers. However, any generic directory server can function as an LDAP server. In this guide,
the terms directory server and LDAP server are synonymous and used interchangeably.
For more information about OUD, see Oracle® Fusion Middleware Administering Oracle
Unified Directory. For more information about OpenLDAP, see OpenLDAP Software 2.4
Administrator's Guide.
LDAP has become a term that refers more to the naming service than to the protocol.
Throughout this guide, the term LDAP is used to refer to the service rather than to the protocol.
The LDAP naming service is one naming service that is supported in Oracle Solaris. For
information about other naming services, see Working With Oracle Solaris 11.4 Directory and
Naming Services: DNS and NIS. For a comparison of the different naming services in Oracle
Solaris, see “Comparing the Naming Services” in Working With Oracle Solaris 11.4 Directory
and Naming Services: DNS and NIS.
■ Naming service – LDAP provides naming data in accordance with a client request. For
example, when resolving host names, LDAP functions like DNS by providing the fully
qualified domain names. Suppose that the name of a domain is west.example.net. If an
application requests the host name by using gethostbyname() or getnameinfo(), LDAP
returns the value server.west.example.net. While LDAP naming service can be used to
look up host names, Oracle recommends using DNS to look up host names.
■ Authentication service – LDAP manages and provides information that relates to client
identity, authentication, and accounts. Therefore, LDAP implements security measures to
provide information only to authorized requesters.
Setting up and managing an LDAP naming service is complex and requires careful planning.
For information about planning for LDAP services, see Chapter 3, “Planning Requirements for
LDAP Naming Services”.
The LDAP naming service stores information in a directory information tree (DIT). The DIT
consists of hierarchically structured containers of information that follow a defined LDAP
schema.
The default schema that is followed by most DITs suffices for most networks that use LDAP.
However, the DIT is flexible. You can specify search descriptors in the client profile to override
the default structure of a DIT. For more information about search descriptors, see “Service
Search Descriptors and Schema Mapping” on page 37.
The following table shows the containers of a DIT and the type of information each container
stores. For more information, see “Directory Information Tree” on page 34.
12 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
LDAP Commands
LDAP Commands
Oracle Solaris provides general LDAP commands and LDAP configuration commands. The
general LDAP commands do not require the system to be configured with the LDAP naming
service. LDAP configuration commands can be run on clients that are configured with the
LDAP naming service.
General LDAP commands can be run on any system and do not require the system to be
configured with the LDAP naming service. LDAP commands support a common set of options,
including authentication and bind parameters. These commands support a common text-based
format called LDAP Data Interchange Format (LDIF) for representing directory information.
The following commands manipulate directory entries:
■ ldapsearch – Searches the LDAP schema for specified entries. See the ldapsearch(1oldap)
man page.
■ ldapmodify – Modifies LDAP entries in the schema. See the ldapmodify(1oldap) man
page.
■ ldapadd – Adds LDAP entries in the schema. See the ldapmodify(1oldap) man page.
■ ldapdelete – Removes LDAP entries from the schema. See the ldapdelete(1oldap) man
page.
14 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
♦ ♦ ♦
2
C H A P T E R 2
The LDAP naming service can use the LDAP repository to provide authentication service. This
chapter discusses LDAP's authentication services and covers the following topics:
■ “LDAP Naming Service Security Model” on page 15
■ “Client Credential Levels” on page 17
■ “Authentication Methods for the LDAP Naming Service” on page 20
■ “Pluggable Authentication Methods” on page 22
■ “LDAP Account Management” on page 28
LDAP supports security features such as authentication and controlled access to ensure integrity
and privacy of the information that LDAP clients obtain. This section describes how an LDAP
client authenticates to the LDAP server and how a user authenticates to a client.
To access the information in the LDAP repository, an LDAP client establishes its identity with
the directory server. The identity can be either anonymous or as a host or user that is recognized
by the LDAP server. LDAP supports the proxy authentication and the per-user authentication of
identities.
The pluggable authentication module (PAM) service determines whether a user login is
successful. Based on the client’s identity and the server’s access control information, the LDAP
server enables the LDAP client to read directory information. For more information about
access control, refer to the documentation for the directory server that you are using.
The basis for user authentication differs depending on the PAM module. See “Pluggable
Authentication Methods” on page 22. LDAP can use the following PAM modules:
■ pam_krb5 module – Uses the Kerberos server for authentication. For more information, see
the pam_krb5(7) man page. For a more extensive description about Kerberos, see Managing
Kerberos in Oracle Solaris 11.4.
■ pam_ldap module – Uses the LDAP server and local host server for authentication. For
more information, see the pam_ldap(7) man page. For information about using the pam_ldap
module, see “LDAP Account Management” on page 28.
■ Equivalent pam_unix_* modules – Information is provided by the system and the
authentication is determined locally.
Note - The pam_unix module is no longer supported in Oracle Solaris. This module has been
replaced by a different set of service modules that provides equivalent or greater functionality.
In this book, pam_unix refers to the modules that provide equivalent functionality, not to the
pam_unix module.
If the pam_ldap module is used, the naming service and the authentication service access the
directory in the following ways:
■ The naming service reads various entries and their attributes from the directory based on
predefined identity.
■ The authentication service authenticates a user’s name and password with the LDAP server
to determine whether the correct password has been specified.
You can use Kerberos and LDAP at the same time to provide both authentication and naming
services to the network. With Kerberos, you can support a single sign-on (SSO) environment in
the enterprise. You can use the Kerberos identity system for querying LDAP naming data on a
per-user or per-host basis.
If you use Kerberos to perform authentication, enable LDAP naming services as a requirement
of the per-user mode. Kerberos can provide dual functions: It authenticates to the LDAP server,
and the Kerberos identity for the user or host is used to authenticate to the directory. In this way,
the same user identity that is used to authenticate to the system is also used to authenticate to
the directory for lookups and updates. If required, you can use access control in the directory to
limit the results out of the naming service.
16 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Client Credential Levels
superset of the Secure Sockets Layer (SSL) protocol. The LDAP naming service supports TLS
security using either the STARTTLS operation on an opened LDAP connection or by opening a
raw SSL (LDAPS) connection.
■ Configure the directory server and LDAP clients for TLS using STARTTLS and/or raw SSL.
See Chapter 4, “Setting Up an Oracle Unified Directory Server or OpenLDAP Server” and
Chapter 5, “Setting Up LDAP Clients”.
■ Install the mandatory certificate PEM files and link databases as described in “How to Set
Up TLS Security” on page 78.
■ If necessary, update /etc/openldap/ldap.conf to include the location of the certificates
used by LDAP with the TLS_CACERTDIR and TLS_CACERT options. See the ldap.
conf(5oldap) man page for more details.
For information about setting up TLS security, see “Setting Up TLS Security” on page 77.
The LDAP server authenticates LDAP clients according to the client credential level. You can
assign any one of the following credential levels for LDAP clients:
■ anonymous – With an anonymous credential level, you can access only the data that is
available to everyone. No LDAP BIND operation occurs. An anonymous credential level
is a high security risk. Any client can change information in the DIT to which the client
has write access, including another user’s password or their own identity. Further, the
anonymous level enables all clients to have read access to all LDAP naming entries and
attributes.
Note - Both OUD and OpenLDAP server enable you to implement security measures by
restricting access based on, for example, IP addresses, DNS name, and authentication
method. See “Understanding Access Control Model in Oracle Unified Directory” in
Oracle® Fusion Middleware Administering Oracle Unified Directory and see “Security
Considerations” in the OpenLDAP Software 2.4 Administrator’s Guide.
■ proxy – With a proxy credential level, the client binds to a single shared set of LDAP
bind credentials. The shared set is also called a proxy account. The proxy account can be
any entry that is allowed to bind to the directory. The account requires sufficient access to
perform the naming service functions on the LDAP server.
The proxy account is a shared-per-system resource, which means that users, including the
root user, who are logged into a system using proxy access see the same information. You
must configure the proxyDN and proxyPassword attributes on every client system that uses
the proxy credential level. Further, the proxyDN must have the same proxyPassword on all
of the LDAP servers.
The encrypted proxyPassword is stored locally on the client. If the password changes for a
proxy user, you must update the password on every client system that uses that proxy user.
Also, if you use password aging on LDAP accounts, make sure to exempt proxy users.
You can set up different proxies for different groups of clients. For example, you can
configure a proxy that limits all the sales clients to access only the company-wide accessible
directories and sales directories. Access to Human Resource directories with payroll
information are forbidden. Or, in the most extreme cases, you can either assign different
proxies to each client or assign just one proxy to all clients.
If you plan to set up multiple proxies for different clients, consider the choices carefully.
Too few proxy agents can limit your ability to control user access to resources. However,
too many proxies complicate the setup and maintenance of the system. You need to
grant the appropriate rights to the proxy user depending on your environment. For more
information about how to determine which authentication method to use, see “Storing
Credential for LDAP Clients” on page 19.
The proxy credential level applies to all users and processes on any specific system. Users
that need to use different naming policies must log in to different systems, or use the per-
user authentication model.
■ proxy anonymous – The proxy anonymous credential level is a multi-valued entry where
more than one credential level is defined. With this level, a client first attempts to be
authenticated by using its proxy identity. If the authentication fails because of user lockout
or expired password, then the client uses anonymous access. Depending on how the
directory is configured, different credential levels might be associated with different levels
of service.
■ self – The self credential level is also known as the per-user mode. This mode uses the
Kerberos identity, called the principal, to perform a lookup for each system or user for
authentication. With per-user authentication, the system administrator can use access control
instructions (ACIs), access control lists (ACLs), roles, groups or other directory access
control mechanisms to grant or deny access to specific naming-service data for specific
users or systems.
To use the per-user authentication model, the following configurations are required:
■ Deployment of the Kerberos single sign-on service
■ Support for the SASL and the SASL/GSSAPI authentication mechanism in one or more
directory servers
■ Configuration of DNS, which Kerberos uses together with files to perform host name
lookups
18 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Client Credential Levels
You can assign administrator credentials to any entry that is allowed to bind to the directory.
However, do not use the same directory manager identity (cn=Directory Manager) of the
LDAP server.
An entry with administrator credentials must have sufficient access to read and write the
shadow data to the directory. The entry is a shared-per-system resource. Therefore, you must
configure the adminDN and adminPassword attributes on every client.
The encrypted adminPassword is stored locally on the client. The admin password uses the
same authentication methods that are configured for the client. All users and processes on a
specific system uses the administrator credentials to read and update the shadow data.
For clients that use per-user authentication, the Kerberos identity and Kerberos ticket
information for each principal is used during authentication. The directory server maps the
Kerberos principal to a DN and the Kerberos credentials are used to authenticate to that DN.
The directory server can use its access control mechanisms to allow or deny access to naming
service data as necessary.
In this environment, Kerberos ticket information is used to authenticate to the directory server.
The system does not store authentication DNs or passwords. Therefore, setting the adminDN and
adminPassword attributes is unnecessary when you initialize the client with the ldapclient
command.
When you assign the proxy or proxy-anonymous credential level to a client, you must also
select a method by which the proxy is authenticated. By default, the authentication method
is none, which implies anonymous access. The authentication method might also have an
associated transport security option.
The authentication method, like the credential level, can be multi-valued. For example, in the
client profile, you can specify that the client tries to bind by using the simple method that
is secured by TLS. If unsuccessful, the client would try to bind with the sasl/digest-MD5
method. In this case, you would configure the authenticationMethod attribute as tls:simple;
sasl/digest-MD5.
LDAP naming service supports some Simple Authentication and Security Layer (SASL)
mechanisms. These mechanisms enable a secure password exchange without requiring TLS.
However, these mechanisms do not provide data integrity or privacy. For information about
SASL, see RFC 4422.
Note - Do not use the CRAM-MD5 and DIGEST-MD5 mechanisms without an encrypted TLS
connection.
Note - Oracle does not recommend using the simple authentication method in combination
with the none credential level.
20 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Authentication Methods for the LDAP Naming Service
■ sasl/cram-MD5 – The LDAP session is not encrypted but the client’s password is protected
during authentication. Do not use this obsolete authentication method.
■ sasl/digest-MD5 – The client’s password is protected during authentication but the session
is not encrypted. The primary advantage of digest-MD5 is that the password is not sent in
clear text during authentication and is more secure than the simple authentication method.
Refer to RFC 2831 for information on digest-MD5. digest-MD5 is an improvement over
cram-MD5.
With sasl/digest-MD5, the authentication is secure but the session is not protected.
■ sasl/GSSAPI – This authentication method is used in conjunction with the per-user mode
to enable per-user lookups. A per-user nscd session with the client’s credentials binds to
the directory server by using the sasl/GSSAPI method and the client’s Kerberos credentials.
Access can be controlled in the directory server on a per-user basis.
■ tls:simple – The client binds using the simple method and the session is encrypted. The
password is protected.
■ tls:sasl/cram-MD5 – The LDAP session is encrypted and the client authenticates to the
directory server using sasl/cram-MD5.
■ tls:sasl/digest-MD5 – The LDAP session is encrypted and the client authenticates to the
directory server using sasl/digest-MD5.
The following table summarizes the various authentication methods and their characteristics.
For more information about the authentication methods that are supported for LDAP naming
service, see the ldapclient(8) man page.
Similarly, when the enableShadowUpdate switch is set to true, the ldap_cachemgr daemon
uses the value for the authenticationMethod attribute if the serviceAuthenticationMethod
attribute is not configured. The daemon does not use the none authentication method.
■ passwd-cmd – Enables the passwd command to change the login password and password
attributes. For more information, see the passwd(1) man page.
■ keyserv – Enables the chkey and newkey utilities to create and change a user’s Diffie-
Hellman key pair. For more information, see the chkey(1) and newkey(8) man pages.
■ pam_ldap – Enables authentication of users that use the pam_ldap service. The pam_ldap
service supports account management.
Note - In per-user mode, the Kerberos service module is used as the authentication service and
ServiceAuthenticationMethod is not needed.
The following example shows a section of a client profile in which the users use sasl/digest-
MD5 to authenticate to the directory server but use an SSL session to change the password.
serviceAuthenticationMethod=pam_ldap:sasl/digest-MD5
serviceAuthenticationMethod=passwd-cmd:tls:simple
With the Pluggable Authentication Method (PAM) framework, you can choose among several
authentication services, including the pam_unix_*, pam_krb5, and pam_ldap_* modules.
To use per-user authentication, you must enable pam_krb5. You can also use pam_krb5
authentication if you do not assign the per-user credential level. If proxy or anonymous
22 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Pluggable Authentication Methods
credential levels are used to access directory server data, then you cannot restrict access to
directory data on a per-user basis.
If you choose anonymous or proxy authentication, use the pam_ldap module instead of the
equivalent pam_unix_* modules. The pam_ldap module is more flexible, supports stronger
authentication methods, and can perform account management.
This section describes how to implement account management for clients that use pam_ldap
module, and how to use the pam_ldap module to enable passwordless authentication. With
passwordless authentication, users can log in with commands such as ssh and sftp without
giving a password.
In order for pam_ldap to work properly, you must properly configure the password and
account lockout policy on the server. Use the ldapmodify command to configure the account
management policy for the LDAP directory.
Ensure that the passwords for proxy users do not expire. If proxy passwords expire, clients
using the proxy credential level cannot retrieve naming service information from the server. To
ensure that proxy users have passwords that do not expire, modify the proxy accounts with the
following script:
# ldapmodify -H ldapuri -D administrator-DN \
-w administrator-password <<EOF
dn: proxy-user-DN
DNchangetype: modify
replace: passwordexpirationtime
passwordexpirationtime: 20380119031407Z
EOF
The pam_ldap account management relies on the directory server to maintain and provide
password aging and account expiration information for users. The directory server does not
interpret the corresponding data from shadow entries to validate user accounts. Because the
shadow data is not kept up to date by the LDAP naming service or the directory server, the
modules should not grant access based on the shadow data. The shadow data is retrieved using
the proxy identity. Therefore, do not allow proxy users to have read access to the userPassword
attribute. Denying proxy users read access to userPassword prevents the PAM service from
making an invalid account validation.
24 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Pluggable Authentication Methods
The pam_ldap module does not read the userPassword attribute. If no client uses UNIX
authentication, granting read access to the userPassword attribute is unnecessary. Similarly, the
pam_ldap module does not support none as an authentication method.
Note - If the simple authentication method is used, the userPassword attribute can be read
unencrypted by third parties.
The pam_ldap module can retrieve and use the account status of users from a properly
configured OpenLDAP server in a limited way: The pam_ldap module will determine only
whether a user account has been permanently locked or might have been locked due to repeated
bind failures.
See the slapo-ppolicy(5oldap) man page for descriptions of the operational attributes.
The pam_ldap module can also retrieve the account status of users from an AD server
to allow passwordless public key authentication for commands such as ssh and sftp.
Note - The pam_unix module has been removed and is no longer supported in Oracle Solaris.
The module has been replaced by a different set of service modules that provides equivalent
or greater functionality. In this guide, pam_unix refers to the modules that provide equivalent
functionality, not to the pam_unix module itself.
The following modules provide the equivalent functionality as the original pam_unix module.
The modules are listed by using their corresponding man pages.
■ pam_authtok_check(7)
■ pam_authtok_get(7)
■ pam_authtok_store(7)
■ pam_dhkeys(7)
■ pam_passwd_auth(7)
■ pam_unix_account(7)
■ pam_unix_auth(7)
■ pam_unix_cred(7)
■ pam_unix_session(7)
26 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Pluggable Authentication Methods
You can check the password history only for the local client and not for an LDAP user account.
In UNIX authentication, the new userPassword attribute is encrypted with the UNIX crypt
format. The attribute is tagged before being written to LDAP. Thus, the new password
is encrypted regardless of the authentication method used to bind to the server. For more
information, see the pam_authtok_store(7) man page.
If the enableShadowUpdate switch is enabled, the pam_unix_* modules update the related
shadow information when the user password is changed. Similarly, the pam_unix_* modules
update the shadow fields in the local shadow files that the modules update when the local user
password is changed.
To support password update, the pam_ldap module can use the pam_authtok_store module
with the server_policy option. When you use pam_authtok_store, the new password is sent
to the LDAP server unencrypted. Use TLS to ensure privacy. Otherwise, the new userPassword
becomes subject to snooping.
If you set an untagged password with OUD, the software uses the passwordStorageScheme
attribute to encrypt the password. For more information about the passwordStorageScheme
attribute, see Security, Access Control, and Password Policies in Oracle® Fusion Middleware
Administering Oracle Unified Directory.
If NIS or any other client that uses UNIX authentication uses LDAP as a repository,
then you must configure the passwordStorageScheme attribute with crypt. Also, if
you use sasl/digest-MD5 LDAP authentication with the OUD, you must configure the
passwordStorageScheme attribute to clear text.
With pam_krb5 performing account and password management, the Kerberos environment
manages all of the account, password, account lockout, and other account management details.
If you do not use pam_krb5, then configure the LDAP naming service to take advantage of the
password and account lockout policy support in OUD. You can configure pam_ldap to support
user account management. With the proper PAM configuration, the passwd command enforces
password syntax rules set by the OUD password policy. However, do not enable account
management for proxy accounts.
The following account management features are supported by pam_ldap. These features depend
on the OUD password and account lockout policy configuration. You can enable the following
account management features:
■ Password aging and expiration notification – Users must change their passwords according
to a schedule. Otherwise, the password expires and user authentication fails.
Users are warned whenever they log in within the expiration warning period. The warning
includes the remaining time before password expiration.
■ Password syntax checking – New passwords must meet the minimum password length
requirements. A password must not match the value of the uid, cn, sn, or mail attributes in
the user’s directory entry.
28 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
LDAP Account Management
■ Password history checking – Users cannot reuse passwords. LDAP administrators can
configure the number of passwords kept in the server’s history list.
■ User account lockout - A user account can be locked out after a specified number of
repeated authentication failures. Users can also be locked out if their accounts are
inactivated by an administrator. Authentication failure continues until the account lockout
time is passed or the administrator reactivates the account.
These account management features work only with the OUD. For information about
configuring the password and account lockout policy on the LDAP server, see Directory Server
Password Policy in Oracle® Fusion Middleware Administering Oracle Unified Directory.
Before configuring the password and account lockout policy on the OUD, make sure all
hosts use the most recent version of the LDAP client with pam_ldap account management.
Additionally, make sure the clients have a properly configured pam.conf file. Otherwise, the
LDAP naming service fails when proxy or user passwords expire.
The LDAP naming service supports the full functionality of the passwd command and the
pam_unix_* modules in the files naming service. If the enableShadowUpdate switch is enabled,
account management functionality becomes available to both local accounts and LDAP
accounts. The functionality includes password aging, account expiry and notification, and
failed login account locking. Also, LDAP supports the -dluNfnwx options of the passwd
command. The enableShadowUpdate switch enables the implementation of consistent account
management for users who are defined in both the files and the LDAP scope.
The pam_ldap and the pam_unix_* modules are incompatible. The pam_ldap module requires
that passwords be modifiable by users, but the pam_unix_* modules do not allow the users to
modify passwords. Therefore, you cannot use the two modules together in the same LDAP
naming domain. Either all clients use the pam_ldap module or all clients use the pam_unix_*
modules. As a consequence of this limitation, you might need to use a dedicated LDAP server
in cases where a web or email application, for example, might require users to change their own
passwords on the LDAP server.
Implementing enableShadowUpdate also requires that the administrator credential (adminDN and
adminPassword) is stored locally on every client in the svc:/network/ldap/client service.
Do not change the /etc/pam.conf file to use the pam_unix_* modules for account
management. The default /etc/pam.conf file is sufficient.
This chapter discusses the high-level planning that you must do before beginning the server and
client setup and installation processes.
An LDAP client uses the collection of configuration information in the LDAP client profile to
access naming service information from the LDAP server. You must specify the configuration
information when you build the profile on the LDAP server. During the server setup, you
are prompted for the configuration information. Some of the information that is prompted is
required, while other information is optional. In most cases, you accept the default values that
are already provided. The individual types of information that are prompted for the profile are
called client attributes.
As you gather the configuration information for the profile, you can refer to the template
checklists used for configuring LDAP in “Checklists for Configuring LDAP” on page 43.
Note - If you are using host names to define both defaultServerList and
preferredServerList, then you must not use LDAP for host server lookup searches.
Do not configure the config/host property of the svc:/network/name-service/switch
service with the value ldap. For more information about LDAP and service management
facility (SMF), see “LDAP and the Service Management Facility” on page 72.
32 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Planning the Configuration of the LDAP Client Profile
■ objectclassMap – Defines object class mappings that the LDAP client uses. By default, no
objectclassMap is defined.
■ searchTimeLimit – Specifies the maximum time, in seconds, that an LDAP client must
allow for a search to complete before timing out. This value does not affect the time the
LDAP server will allow for a search to complete. The default value is 30 seconds.
■ bindTimeLimit – Specifies maximum time in seconds an LDAP client must allow to bind
with a server before timing out. The default value is 30 seconds.
■ followReferrals – Specifies whether an LDAP client should follow an LDAP referral.
Possible values are TRUE or FALSE. The default value is TRUE.
■ profileTTL – Specifies time between refreshes of the LDAP client profile from the LDAP
server by the ldap_cachemgr daemon. The default value is 43200 seconds or 12 hours.
If given a value of 0, the profile will never be refreshed. For more information, see the
ldap_cachemgr(8) man page.
The LDAP client profile attributes are automatically set up when you run the ldapservercfg
command on the server. Additional profiles can be generated by using ldapclient
genprofile, as described in the ldapclient(8) man page.
You can use the ldapclient command to set up local client attributes. For more information,
see “Defining LDAP Local Client Attributes” on page 73.
When planning the LDAP network model, you must determine the physical servers to be
deployed for the LDAP naming service. To ensure availability and performance, each subnet
of the network must have one LDAP server to service the LDAP clients in that subnet. When
planning for this model, you should consider the following factors:
■ Number of systems to be deployed as LDAP servers
Which servers are designated master servers, and which servers are replicas that serve as
backups?
For example, in a slow network, you might increase the length of time for searching and
for allowing TCP connect requests. In a development environment, you might limit the
frequency of downloading a profile by an LDAP client.
The LDAP naming service uses a default Directory Information Tree (DIT) to store
information. The DIT is based on an LDAP schema.
The DIT consists of containers of information that are hierarchically structured. The structure
follows the standard LDAP schema described in RFC 2307 and RFC 4876.
The default structure of the DIT suffices for most network setups to implement LDAP. With the
default structure, you only need to determine the following:
■ The base node distinguished name (DN) of the tree that naming service will search for
information about a specific domain. The defaultSearchBase attribute manages the base
node information.
34 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Planning the Configuration of the LDAP Client Profile
■ The scope of search that a naming service lookup functionality should perform. The scope
can cover either only one level below the DN, or the entire subtree below the DN. This
information is managed by the attribute defaultSearchScope.
A DIT can also have a more complicated structure for storing data. For example, you can
store the data about user accounts in different parts of the DIT. You should determine how to
customize the behavior of the search operation such as the base DN, the scope, and the filters
to use that overrides the default search sequence. The customized search sequence information
is managed by the attributes serviceSearchDescriptor, attributeMap, and objectclassMap.
For a detailed explanation about customizing the search sequence operation, see “Service
Search Descriptors and Schema Mapping” on page 37.
Multiple servers can serve a single DIT. In this setup, the subtrees of a DIT might be distributed
across multiple servers. Therefore, you must further configure LDAP servers to redirect LDAP
client requests to the appropriate LDAP servers which can provide the requested information.
The followReferrals attribute manages the information about how to redirect LDAP client
requests to the correct server.
Having a single LDAP server providing all the naming data for a specific domain is the
typical and recommended setup. Even in this scenario, however, you can still configure the
followReferrals attribute to direct LDAP clients to read-only replica servers for most of the
information requests. Access to a master server to perform read and write operations is not
typically provided. With a referral configuration, you prevent the master server from overload.
Security Considerations
For the security of LDAP operations that process requests for directory information, consider
the following:
■ The manner by which LDAP clients identify themselves to access information, which is
determined by the credential level that you specify for the clients. The credential level is
managed by the credentialLevel attribute, to which you can assign one of the following
values:
■ anonymous
■ proxy
■ proxy anonymous
■ self
For detailed descriptions of each of these values, see “Client Credential Levels” on page 17.
■ The method of authenticating the LDAP client, which is managed by the
authenticationMethod attribute. You can specify the authentication method by assigning
one of the following options:
■ none
■ simple
■ sasl/digest-MD5
■ sasl/cram-MD5
■ sasl/GSSAPI
■ tls:simple
■ tls:sasl/cram-MD5
■ tls:sasl/digest-MD5
For detailed descriptions of each of these values, see “Authentication Methods for the
LDAP Naming Service” on page 20.
In addition to the credential level to assign to LDAP clients as well as the authentication method
to use, you should also consider the following:
You can configure multiple master servers to store read-write copies of the same directories. For
large-scale enterprise deployments, you must use multi-master replication.
You must establish a conflict resolution policy because updating the same directories in
different master servers can cause conflicts.
For information about how to set up replica servers, see “Understanding the Oracle Unified
Directory Replication Model” in Oracle® Fusion Middleware Administering Oracle Unified
Directory and see “Replication” in the OpenLDAP Software 2.4 Administrator’s Guide.
36 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Planning the LDAP Data Population
Note - The default filters are listed in “Default Filters Used by the LDAP Naming
Service” on page 39.
If you use schema mapping, you must make sure that the syntax of the mapped attribute is
consistent with the attribute it is mapped to. For example, the single-valued attributes must map
to single-valued attributes and the attributes must have the same syntax. Also, ensure that the
mapped object classes have the correct mandatory attributes.
Note - The default location is not searched for a service (database) with an SSD unless it is
included in the SSD. Unpredictable behavior will result if multiple SSDs are specified for a
service.
In the following example, the LDAP naming service client performs a single-level search in
ou=west,dc=example,dc=com followed by a single-level search in ou=east,dc=example,
dc=com for the passwd service. To look up the passwd data for a user's username, the default
LDAP filter (&(objectClass=posixAccount)(uid=username)) is used for each BaseDN.
serviceSearchDescriptor: passwd:ou=west,dc=example,dc=com;ou=east,
dc=example,dc=com
In the following example, the LDAP naming service client would perform a subtree search
in ou=west,dc=example,dc=com for the passwd service. To look up the passwd data for user
username, the subtree ou=west,dc=example,dc=com would be searched with the LDAP filter (&
(fulltimeEmployee=TRUE)(uid=username)).
serviceSearchDescriptor: passwd:ou=west,dc=example,
dc=com?sub?fulltimeEmployee=TRUE
You can also associate multiple containers with a particular service type. In the following
example, the service search descriptor specifies searching for the password entries in three
containers.
ou=myuser,dc=example,dc=com
ou=newuser,dc=example,dc=com
ou=extuser,dc=example,dc=com
Note that a trailing ',' in the example implies that the defaultSearchBase is appended to the
relative base in the SSD.
defaultSearchBase: dc=example,dc=com
serviceSearchDescriptor: \
passwd:ou=myuser,;ou=newuser,;ou=extuser,dc=example,dc=com
attributeMap Attributes
The LDAP naming service enables one or more attribute names to be remapped for any of its
services. If you map an attribute, you must be sure that the attribute has the same meaning and
syntax as the original attribute. Note that mapping the userPassword attribute might cause
problems.
Consider using schema mappings in situations where you want to map attributes in an existing
directory server. If you have user names that differ only in case, you must map the uid attribute,
which ignores case, to an attribute that does not ignore case.
If you want to map more than one attribute for a given service, you can define multiple
attributeMap attributes.
38 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Service Search Descriptors and Schema Mapping
In the following example, the employeeName and home attributes would be used whenever the
uid and homeDirectory attributes would be used for the passwd service.
attributeMap: passwd:uid=employeeName
attributeMap: passwd:homeDirectory=home
You can map the passwd service's gecos attribute to several attributes, as shown in the
following example.
attributeMap: gecos=cn sn title
This example maps the gecos values to a space separated list of the cn, sn, and title attribute
values.
objectclassMap Attribute
The LDAP naming service enables object classes to be remapped for any of its services.
If you want to map more than one object class for a given service, you can define multiple
objectclassMap attributes. In the following example, the myUnixAccount object class is used
whenever the posixAccount object class is used.
objectclassMap: passwd:posixAccount=myUnixAccount
The ldaplist command generates the following list of default filters, where %s signifies a
string and %d, a number.
hosts
(&(objectclass=iphost)(cn=%s))
--------------
passwd
(&(objectclass=posixaccount)(uid=%s))
--------------
services
(&(objectclass=ipservice)(cn=%s))
--------------
group
(&(objectclass=posixgroup)(cn=%s))
--------------
netgroup
(&(objectclass=nisnetgroup)(cn=%s))
--------------
networks
(&(objectclass=ipnetwork)(ipnetworknumber=%s))
--------------
netmasks
(&(objectclass=ipnetwork)(ipnetworknumber=%s))
--------------
rpc
(&(objectclass=oncrpc)(cn=%s))
--------------
protocols
(&(objectclass=ipprotocol)(cn=%s))
--------------
bootparams
(&(objectclass=bootableDevice)(cn=%s))
--------------
ethers
(&(objectclass=ieee802Device)(cn=%s))
--------------
publickey
(&(objectclass=niskeyobject)(cn=%s))
or
(&(objectclass=niskeyobject)(uidnumber=%d))
--------------
aliases
(&(objectclass=mailGroup)(cn=%s))
--------------
The following table lists the LDAP filters used in the getXbyY call.
Filter Definition
bootparamByName (&(objectClass=bootableDevice)(cn=%s))
etherByHost (&(objectClass=ieee802Device)(cn=%s))
etherByEther (&(objectClass=ieee802Device)(macAddress=%s))
groupByName (&(objectClass=posixGroup)(cn=%s))
groupByGID (&(objectClass=posixGroup)(gidNumber=%ld))
40 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Service Search Descriptors and Schema Mapping
Filter Definition
groupByMember (&(objectClass=posixGroup)(memberUid=%s))
hostsByName (&(objectClass=ipHost)(cn=%s))
hostsByAddr (&(objectClass=ipHost)(ipHostNumber=%s))
keyByUID (&(objectClass=nisKeyObject)(uidNumber=%s))
keyByHost (&(objectClass=nisKeyObject)(cn=%s))
netByName (&(objectClass=ipNetwork)(cn=%s))
netByAddr (&(objectClass=ipNetwork)(ipNetworkNumber=%s))
nisgroupMember (membernisnetgroup=%s)
maskByNet (&(objectClass=ipNetwork)(ipNetworkNumber=%s))
printerByName (&(objectClass=sunPrinter)(|(printer-name=%s) (printer-aliases=%s)))
projectByName (&(objectClass=SolarisProject)(SolarisProjectName=%s))
projectByID (&(objectClass=SolarisProject)(SolarisProjectID=%ld))
protoByName (&(objectClass=ipProtocol)(cn=%s))
protoByNumber (&(objectClass=ipProtocol)(ipProtocolNumber=%d))
passwordByName (&(objectClass=posixAccount)(uid=%s))
passwordByNumber (&(objectClass=posixAccount)(uidNumber=%ld))
rpcByName (&(objectClass=oncRpc)(cn=%s))
rpcByNumber (&(objectClass=oncRpc)(oncRpcNumber=%d))
serverByName (&(objectClass=ipService)(cn=%s))
serverByPort (&(objectClass=ipService)(ipServicePort=%ld))
serverByNameAndProto (&(objectClass=ipService)(cn=%s)(ipServiceProtocol=%s))
specialByNameserver (ipServiceProtocol=%s))
ByPortAndProto (&(objectClass=shadowAccount)(uid=%s))
netgroupByTriple (&(objectClass=nisNetGroup)(cn=%s))
netgroupByMember (&(objectClass=nisNetGroup)(cn=%s))
authName (&(objectClass=SolarisAuthAttr)(cn=%s))
auditUserByName (&(objectClass=SolarisAuditUser)(uid=%s))
execByName (&(objectClass=SolarisExecAttr)(cn=%s) (SolarisKernelSecurityPolicy=%s)
(SolarisProfileType=%s))
execByPolicy (&(objectClass=SolarisExecAttr)(SolarisProfileId=%s)
(SolarisKernelSecurityPolicy=%s)(SolarisProfileType=%s))
profileByName (&(objectClass=SolarisProfAttr)(cn=%s))
userByName (&(objectClass=SolarisUserAttr)(uid=%s))
Filter Definition
aliases (objectClass=rfc822MailGroup)
auth_attr (objectClass=SolarisAuthAttr)
audit_user (objectClass=SolarisAuditUser)
exec_attr (objectClass=SolarisExecAttr)
group (objectClass=posixGroup)
hosts (objectClass=ipHost)
networks (objectClass=ipNetwork)
prof_attr (objectClass=SolarisProfAttr)
protocols (objectClass=ipProtocol)
passwd (objectClass=posixAccount)
printers (objectClass=sunPrinter)
rpc (objectClass=oncRpc)
services (objectClass=ipService)
shadow (objectclass=shadowAccount)
project (objectClass=SolarisProject)
usr_attr (objectClass=SolarisUserAttr)
■ profileName
■ defaultServerList
■ preferredServerList
■ bindTimeLimit
■ searchTimeLimit
■ profileTTL
■ defaultSearchBase
■ defaultSearchScope
42 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Checklists for Configuring LDAP
■ serviceSearchDescriptor
■ attributeMap
■ objectclassMap
■ followReferrals
■ credentialLevel
■ authenticationMethod
■ serviceCredentialLevel
■ serviceAuthenticationMethod
44 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
♦ ♦ ♦
4
C H A P T E R 4
This chapter describes how to configure Oracle Unified Directory (OUD) and OpenLDAP
servers to support LDAP clients for Oracle Solaris.
The ldapservercfg utility configures and prepares a compatible directory server, installed
on the system where ldapservercfg is run, to serve LDAP clients. OUD and OpenLDAP are
compatible directory servers.
The directory server is configured to support the following. See also ldap(7).
Note - The OUD server must already be installed and configured on the server where you are
running the ldapservercfg utility before you can perform this procedure.
46 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Configure the Oracle Unified Directory Server
What would you like to use as the initial root user DN for the Directory
Server? [cn=Directory Manager]:
Please provide the password to use for the initial root user:
Please re-enter the password for confirmation:
On which port would you like the Directory Server to accept connections from
LDAP clients? [1389]:
Do you want to create base DNs in the server? (yes / no) [yes]:
1) No Integration
2) DIP (Directory Integration Platform)
3) Generic: Database Net Services, EBS and DIP
4) EUS (Enterprise User Security), Database Net Services, EBS and DIP
c) cancel
How do you want the off-line tools (import-ldif, export-ldif, verify-index and
rebuild-index) to be tuned?
Do you want to start the server when the configuration is completed? (yes /
no) [yes]:
Setup Summary
=============
LDAP Listener Port: 1389
Administration Connector Port: 4444
LDAP Secure Access: Enable StartTLS
Enable SSL on LDAP Port 1636
Create a new Self-Signed Certificate
Root User DN: cn=Directory Manager
Directory Data: Create New Base DN dc=example,dc=com
Base DN Data: Only Create Base Entry
(dc=example,dc=com)
Integration with Oracle components: No Integration
Server Runtime Settings: Use the default Java Virtual Machine
settings
Off-line Tools Runtime Settings: Use the default Java Virtual Machine
48 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Configure the Oracle Unified Directory Server
settings
Start Server when the configuration is completed
What would you like to do?
1) Set up the server with the parameters above
2) Provide the setup parameters again
3) Print equivalent non-interactive command-line
4) Cancel and exit
Enter choice [1]:
See /export/home/admin/Oracle/Middleware/asinst_1/OUD/logs/oud-setup for a
detailed log of this operation.
Configuring Directory Server ..... Done.
Configuring Certificates ..... Done.
Creating Base Entry dc=example,dc=com ..... Done.
Starting Directory Server ............. Done.
To see basic server configuration status and configuration you can launch
/export/home/admin/Oracle/Middleware/asinst_1/OUD/bin/status
~$
~$ /usr/sbin/ldapservercfg oud
Enter the administration port number for DS (h=help): [4444]
Enter the port number for DS (h=help): [389] 1389
Enter the directory manager CN: [Directory Manager]
Enter password for Directory Manager:
The following are existing base DNs
[1] dc=example,dc=com
1 anonymous
2 proxy
Summary of Configuration
50 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Configure the Oracle Unified Directory Server
The ldapservercfg utility reads initial parameter values from the svc:/network/ldap/
server:openldap service configuration and deploys OpenLDAP using an Online Configuration
(OLC), also known as cn=config or slapd-config. See the description of the configuration
repository in the slapd-config(5oldap) man page, and see the -F option in the slapd(8) man
page.
52 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Pre-Configure a Newly Installed System to be an OpenLDAP Server
The OpenLDAP server is configured to accept unencrypted connections on port 389, encrypted
connections with STARTTLS on port 389, and encrypted connections using raw TLS on
port 636. When the server configuration is successful, the configuration properties in svc:/
network/ldap/server:openldap are updated.
Note - OpenLDAP must already be installed on the server where you are running the
ldapservercfg utility before you can configure the OpenLDAP server to work with Oracle
Solaris LDAP clients.
2. Check whether the Domain Name System (DNS) service is working correctly.
Use the following command to verify that the server’s Fully Qualified Domain Name (FQDN)
is available:
$ host hostname
# uname -n
server.example.com
# host server
server.example.com has address 192.0.2.0
For more information about the DNS service, see Chapter 3, “Managing DNS Server and Client
Services” in Working With Oracle Solaris 11.4 Directory and Naming Services: DNS and NIS.
Oracle Solaris packaging of OpenLDAP no longer provides support for the Berkeley DB (BDB)
format static backends. Import data using the default Lightning Memory-Mapped Database
(LMDB) format.
Note - The first steps of this procedure must be completed before upgrading.
# mkdir -p /var/share/openldap
# slapcat -l /var/share/openldap/data.ldif
3. Perform the system upgrade and boot into the upgraded boot environment.
If the openldap service is in the maintenance state (if it was enabled at the time of system
upgrade), disable the openldap service.
TLSProtocolMin 3.2
■ database: OpenLDAP database type. Make sure database is set to mdb.
database mdb
54 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Migrate Existing OpenLDAP Server Configuration
If the service status is not online, check the service log file to troubleshoot.
# svcs -Lv ldap/server:openldap
The ldapservercfg utility can configure an OpenLDAP server instance interactively or with
default settings read from an SMF service instance.
By default, the Oracle Solaris OpenLDAP server instance uses Online Configuration (OLC)
instead of the legacy configuration file slapd.conf.
■ When OLC exists, the ldap/server:openldap service starts the slapd daemon using
the OLC configuration. After running ldapservercfg openldap, LDAP configuration is
contained in /etc/openldap/slapd.d.
■ When OLC is not available, the ldap/server:openldap service uses a plain configuration
file, /etc/openldap/slapd.conf. This slapd.conf file is useful for manually configuring
OpenLDAP or for migrating from another server.
The server is configured using property values of the service. If the values of the service
properties have not been changed from their default values, the directory is configured to serve
the distinguished name dc=example,dc=com. See the default configuration shown below in Step
2.
The following files and directories must not exist or must be empty:
■ The /etc/openldap/slapd.conf legacy configuration file does not exist.
■ The /etc/openldap/slapd.d directory does not exist.
■ The /etc/openldap/certs directory does not exist.
■ The /var/openldap/openldap-data directory is empty.
56 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Configure an OpenLDAP Server With Settings from SMF
For more information about these values, see the ldapclient(8) and ldapservercfg(8)
man pages.
$ su - openldap
$ /usr/sbin/ldapservercfg -a openldap
TLS CA certificate directory: /etc/openldap/certs
TLS CA certificate file: /etc/certs/ca-certificates.crt
TLS public certificate file: /etc/openldap/certs/certdb.pem
TLS private key file: /etc/openldap/certs/server.key Starting server...Succeeded.
Summary of Configuration
58 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Configure OpenLDAP Server Interactively
The ldapservercfg openldap command (no -a option) prompts you for settings. Default
values are taken from openldap service property values as discussed in “Configuring openldap
Service Properties” on page 62.
Summary of Configuration
60 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Configure OpenLDAP Server Interactively
Use this procedure to change the credentials names and passwords before initial configuration.
The password (passwd) properties are not used when running ldapservercfg interactively.
# slappasswd -h "{SSHA}"
New password: yoursecret
Reenter new password: yoursecret
{SSHA}password-hash
# svccfg s ldap/server:openldap
svc:/network/ldap/server:openldap> setprop cred/backend_passwd = astring:
"{SSHA}password-hash"
svc:/network/ldap/server:openldap> setprop cred/proxy_passwd = astring: "{SSHA}password-
hash"
svc:/network/ldap/server:openldap> setprop cred/admin_passwd = astring: "{SSHA}password-
hash"
svc:/network/ldap/server:openldap> refresh
svc:/network/ldap/server:openldap> quit
62 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Specify Credentials
The following command opens an editor on the properties of the openldap service:
# svccfg -s ldap/server:openldap editprop
When you issue the preceding command, your editor opens with content very similar to the
following content:
##
## Change property values by removing the leading '#' from the
## appropriate lines and editing the values. svccfg subcommands
## such as delprop can also be added to the script.
##
##
## Hostname and Port
##
# setprop config/urls = astring: ("ldap:///" "ldaps:///" "ldapi:///")
# setprop config/value_authorization = astring: solaris.smf.value.name-service.ldap.
server
##
## Admin Common Name
##
# setprop cred/admin_cn = astring: admin
##
## Admin Password
##
# setprop cred/admin_passwd =
##
## Backend Common Name
##
##
## Backend Password
##
# setprop cred/backend_passwd =
##
## Proxy Common Name
##
# setprop cred/proxy_cn = astring: proxyagent
##
## Proxy Password
##
# setprop cred/proxy_passwd =
# setprop cred/read_authorization = astring: solaris.smf.read.name-service.ldap.server
# setprop cred/stability = astring: Evolving
# setprop cred/value_authorization = astring: solaris.smf.value.name-service.ldap.server
##
## Authentication Method(s)
##
# setprop profile/default/authentication_method = astring: tls:simple
##
## Credential Level(s)
##
# setprop profile/default/credential_level = astring: proxy
##
## Search Base
##
# setprop profile/default/search_base = astring: "dc=example,dc=com"
##
## Search Scope
##
# setprop profile/default/search_scope = astring: one
##
## Server List
64 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Specify Credentials
##
# setprop profile/default/server_list =
##
## Service Search Descriptor(s)
##
# setprop profile/default/service_search_descriptor =
# setprop profile/default/value_authorization = astring: solaris.smf.value.name-service.
ldap.server
The following partial file shows how to change the passwords and the search base:
##
## Admin Password
##
setprop cred/admin_passwd = astring: {SSHA}j9X9QwojnqelDhdl2qR6+OeWkkNVCRSD
##
## Backend Password
##
setprop cred/backend_passwd = astring: {SSHA}j9X9QwojnqelDhdl2qR6+OeWkkNVCRSD
##
## Proxy Password
##
setprop cred/proxy_passwd = astring: {SSHA}j9X9QwojnqelDhdl2qR6+OeWkkNVCRSD
##
## Search Base
##
setprop profile/default/search_base = astring: "dc=sample,dc=example,dc=com"
After you exit your editor, use the following command to verify the changes you made:
The output from the following ldapservercfg command shows that the changes to the
credential and profile properties have been applied:
$ /usr/sbin/ldapservercfg -a openldap
TLS CA certificate directory: /etc/openldap/certs
TLS CA certificate file: /etc/certs/ca-certificates.crt
TLS public certificate file: /etc/openldap/certs/certdb.pem
TLS private key file: /etc/openldap/certs/server.key
Starting server…Succeeded.
Summary of Configuration
66 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Specify Credentials
■ How to use the ldapservercfg command to determine whether a system is or has been
previously configured as an OpenLDAP server.
■ How to remove OpenLDAP server configuration.
The following are true for a newly installed system or a system that has not been configured as
an OpenLDAP server:
$ svcs ldap/server:openldap
STATE STIME FMRI
disabled Jun_17 svc:/network/ldap/server:openldap
If the ldap/server:openldap service instance was previously enabled and online, then the
service created the default configuration as specified in its SMF properties.
■ The following files and directories do not exist or are empty:
■ The /etc/openldap/slapd.conf legacy configuration file does not exist.
■ The /etc/openldap/slapd.d directory does not exist.
■ The /etc/openldap/certs directory does not exist.
■ The /var/openldap/openldap-data directory is empty.
If any of these files or directories exist, then the system might have been used as an
OpenLDAP server previously.
When you run the ldapservercfg command on a system that has previously been configured as
an OpenLDAP server, you are warned and prompted to confirm whether you want to continue
with this reconfiguration:
**************************************************************************
WARNING: The OpenLDAP server has already been configured.
If you want to rerun the initial configuration, be sure to do
necessary backups using slapcat, i.e.
/usr/sbin/slapcat -F /etc/openldap/slapd.d -b \
"dc=example,dc=com" > example.com.ldif
68 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Remove OpenLDAP Configuration
[1] dc=example,dc=com
# slapcat -n 1 -l /var/tmp/dit.ldif
# slapcat -n 0 -l /var/tmp/config.ldif
# rm -rf /etc/openldap/certs
This chapter describes how to set up an LDAP naming service client. It covers the following
topics:
■ “Requirements for LDAP Client Setup” on page 71
■ “LDAP and the Service Management Facility” on page 72
■ “Defining LDAP Local Client Attributes” on page 73
■ “Initializing an LDAP Client” on page 74
■ “Modifying an LDAP Client Configuration” on page 75
■ “Uninitializing an LDAP Client” on page 76
■ “Using LDAP for Client Authentication” on page 76
The ldapclient utility performs all of the listed configuration steps except for starting the
server. This chapter provides examples of how to use the ldapclient utility to set up an LDAP
client and how to use the various other LDAP utilities to get information about an LDAP client.
Note - Because LDAP and NIS use the same domain name component that is defined in the
network/nis/domain service, Oracle Solaris does not support a configuration in which an NIS
client and a native LDAP client coexist on the same client system.
The Oracle Solaris SMF manages the LDAP client service. For more information about SMF,
refer to Managing System Services in Oracle Solaris 11.4. For more information about the
commands used to modify the SMF service, see the svcadm(8) and svcs(1) man pages.
The features of SMF that relate to administering the LDAP client service are as follows:
■ The svcadm command is used to enable, disable, or restart the LDAP client service.
Tip - You can use the -t option to temporarily disable a service to provide protection for
the service configuration. If the service is disabled with the -t option, the original settings
are restored for the service after a reboot. If the service is disabled without -t, the service
remains disabled after reboot.
■ The Fault Management Resource Identifier (FMRI) for the LDAP client service is svc:/
network/ldap/client.
■ The LDAP client configuration process enables the network/nis/domain service to supply
the domain name to be used by the network/ldap/client service.
■ Use the svcs command to query the status of the LDAP client and the ldap_cachemgr
daemon.
■ The following example shows the svcs command and its output.
# svcs \*ldap\*
STATE STIME FMRI
online 15:43:46 svc:/network/ldap/client:default
■ Use the -l option if you want to provide the instance name in the FMRI.
# svcs -l network/ldap/client:default
fmri svc:/network/ldap/client:default
name LDAP Name Service Client
enabled true
state online
next_state none
restarter svc:/system/svc/restarter:default
manifest /lib/svc/manifest/network/ldap/client.xml
manifest /lib/svc/manifest/network/network-location.xml
manifest /lib/svc/manifest/system/name-service/upgrade.xml
manifest /lib/svc/manifest/milestone/config.xml
dependency require_all/none svc:/system/filesystem/minimal (online)
dependency require_all/none svc:/network/initial (online)
72 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Defining LDAP Local Client Attributes
Configuration information specified in the LDAP client profiles is automatically imported into
the SMF repository when the svc:/network/ldap/client service is started.
Use the ldapclient command to set up the following local client attributes:
■ adminDN – Specifies the administrator entry's distinguished name for the admin credential.
If the value of the enableShadowUpdate switch is true on the client system and
credentialLevel has a value other than self, then you must specify the adminDN attribute.
■ adminPassword – Specifies the administrator entry's password for the admin credential.
If the value of the enableShadowUpdate switch is true on the client system and
credentialLevel has a value other than self, then you must define the adminPassword
attribute.
■ domainName – Specifies the client's domain name, which becomes the default domain for the
client system. You must specify the value of the attribute as it has no default value.
■ proxyDN – Specifies the proxy's distinguished name. If the client system is configured with
credentialLevel set to proxy, you must specify the proxyDN.
■ proxyPassword – Specifies the proxy's password. If the client system is configured with
credentialLevel set to proxy, you must define the proxyPassword.
■ certificatePath – Specifies the directory on the local file system containing the
certificate databases. You must use this attribute if a client system is configured with
authenticationMethod or serviceAuthenticationMethod using TLS. The default value is
/var/ldap.
Note - If the BaseDN in an SSD contains a trailing comma, it is used as a relative value of the
defaultSearchBase. The values of the defaultSearchBase are appended to the BaseDN before
a search is performed.
■ Using a profile – When you use the ldapclient command, you must specify the server
address of the profile and the domain. If you do not specify a profile, the default profile is
assumed. The server provides the rest of the required information from the profile except
the proxy and certificate database information.
If a client's credential level is proxy or proxy anonymous, you must supply the proxy bind
DN and password. For more information, see “Client Credential Levels” on page 17.
To enable shadow data update, you must provide the administrator's credentials (adminDN
and the adminPassword).
Using a profile reduces the complexity of LDAP configuration, particularly in enterprise
environments.
■ Defining all the parameters in a single command line – If profile does not exist, you can
create the profile on the client itself. With this method, the profile information is stored in
cache files and is never refreshed by the server.
You can use various options with the ldapclient command to initialize the client depending on
the type of client and the client profile:
■ Initializing a client by using a profile that is configured with default values. For example:
Note - Several requirements must be fulfilled when you initialize a client that is configured
with per-user credentials, such as Kerberos configuration and DNS server configuration
to work with LDAP. For information about Kerberos, see Managing Kerberos in Oracle
Solaris 11.4. For information about DNS configuration, see Chapter 3, “Managing DNS
Server and Client Services” in Working With Oracle Solaris 11.4 Directory and Naming
Services: DNS and NIS.
# ldapclient init \
74 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Modifying an LDAP Client Configuration
-a proxyDN=cn=proxyagent,ou=profile,dc=west,dc=example,dc=com \
-a domainname=west.example.com \
-a profilename=pit1 \
-a proxypassword=test1234 192.0.2.1
The -a proxyDN and -a proxyPassword options are required if the profile to be used is set
up for proxy. Because the credentials are not stored in the profile saved on the server, you
must supply the information when you initialize the client. This method is more secure than
the older method of storing the proxy credentials on the server.
The proxy information is stored in the svc:/network/ldap/client service in the config
and cred property groups.
■ Initializing a client to enable the shadow data to be updated. For example:
# ldapclient init \
-a adminDN=cn=admin,ou=profile,dc=west,dc=example,dc=com \
-a adminPassword=admin-password \
-a domainName=west.example.com \
-a profileName=WestUserProfile \
-a proxyDN=cn=proxyagent,ou=profile,dc=west,dc=example,dc=com \
-a proxyPassword=proxy-password \
-a enableShadowUpdate=TRUE \
192.0.2.1
System successfully configured
The preferred way to configure PAM to use LDAP policy is to update the PAM_POLICY entry in
/etc/security/policy.conf to be the following:
PAM_POLICY=ldap
If you need to configure PAM to use UNIX authentication (the default), update the PAM_POLICY
entry in /etc/security/policy.conf to be the following:
76 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Using LDAP for Client Authentication
PAM_POLICY=unix
Starting with Oracle Solaris 11.4, the OpenLDAP LDAP library uses OpenSSL for security
services. OpenSSL offers more robust certificate management than the certificate management
that was used in prior Oracle Solaris releases.
You must install the necessary CA or self-signed certificate into the certificate directory
prior to configuring the LDAP client. By default, the certificate directory location is /var/
ldap. To change the location, use the ldapclient command to set the certificatePath
attribute or change the location in the LDAP profile on the server. See the ldapclient(8) and
ldapaddent(8) man pages for details. The certificatePath attribute is discussed in more
detail in the ldapclient(8) man page.
When you upgrade a system from Oracle Solaris 11.3 or earlier to Oracle Solaris 11.4, the
Mozilla certificate databases, if they exist, are automatically converted to the newer OpenSSL
PEM format. The svc:/system/name-service/upgrade:default SMF service converts the
Mozilla certificate databases to the OpenSSL PEM format and writes them to files within
the certificate directory. OpenSSL hash links to those PEM files are also created. After the
certificate databases are converted, they are renamed and can be deleted. If any unconverted
Mozilla certificate databases remain in the certificate directory, they can be converted to PEM
files by manually restarting the name-service/upgrade:default service. For information
about restarting a service, see “Restarting a Service” in Managing System Services in Oracle
Solaris 11.4 and the svcadm(8) man page.
The OpenSSL library also supports the option of storing all the mandatory CA or self-signed
certificates within a single PEM file, thus negating the need for the PEM hashing scheme. If
you use this option, then LDAP naming services look for a certdb.pem file in the certificate
directory by default instead of hashes. If the value of certificatePath points to a directory,
then the LDAP client looks for PEM file hashes, and then for a certdb.pem file, and uses the
certificate format that it discovers.
Note - The PEM certificate files must be readable by everyone. Do not encrypt or remove read
permissions on these files. Otherwise, commands such as ldaplist will fail.
For information about how to create and manage PEM formatted certificates, see Directory
Server Security.
# cp certdb.pem /var/ldap
Note - More than one certificate file might reside in the certificate path. Additionally, any
given PEM certificate file might contain multiple PEM format certificates that are concatenated
together. Refer to your server documentation for further details. The certificate files must be
stored on a local file system if you are using them for an LDAP naming service client.
78 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
♦ ♦ ♦
6
C H A P T E R 6
This chapter describes common LDAP configuration problems and suggests solutions for
resolving them. It covers the following topics:
■ “Displaying the LDAP Naming Service Information” on page 79
■ “Monitoring LDAP Client Status” on page 81
■ “LDAP Configuration Problems and Solutions” on page 85
■ “Resolving Per-User Credentials Issues” on page 88
The output of ldaplist depends upon the client configuration. For example, if the value of
ns_ldap_search is sub rather than one, ldaplist lists all the entries under the current search
baseDN.
# ldaplist
dn: ou=people,dc=west,dc=example,dc=com
dn: ou=group,dc=west,dc=example,dc=com
dn: ou=rpc,dc=west,dc=example,dc=com
dn: ou=protocols,dc=west,dc=example,dc=com
dn: ou=networks,dc=west,dc=example,dc=com
dn: ou=netgroup,dc=west,dc=example,dc=com
dn: ou=aliases,dc=west,dc=example,dc=com
dn: ou=hosts,dc=west,dc=example,dc=com
dn: ou=services,dc=west,dc=example,dc=com
dn: ou=ethers,dc=west,dc=example,dc=com
dn: ou=profile,dc=west,dc=example,dc=com
dn: automountmap=auto_home,dc=west,dc=example,dc=com
dn: automountmap=auto_direct,dc=west,dc=example,dc=com
dn: automountmap=auto_master,dc=west,dc=example,dc=com
dn: automountmap=auto_shared,dc=west,dc=example,dc=com
You also use the getent command to perform lookups on databases that are listed in the
automount table, for example, getent automount/map [key]. In the following example,
auto_home is the name of the automount map and user1 is the search key. If you do not specify
any search key, then the entire content of the specified automount map is listed.
80 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Monitoring LDAP Client Status
dn: uid=user1,ou=People,dc=west,dc=example,dc=com
uid: user1
cn: user1
uidNumber: 30641
gidNumber: 10
gecos: Joe Q. User
homeDirectory: /home/user1
loginShell: /bin/csh
objectClass: top
objectClass: shadowAccount
objectClass: account
objectClass: posixAccount
shadowLastChange: 6445
For information about Service Management Facility (SMF), refer to Managing System Services
in Oracle Solaris 11.4. Also refer to the svcadm(8) and svcs(1) man pages for more details.
# svcs \*ldap\*
STATE STIME FMRI
disabled Aug_24 svc:/network/ldap/client:default
# svcs -l network/ldap/client:default
fmri svc:/network/ldap/client:default
name LDAP Name Service Client
enabled false
state disabled
next_state none
state_time Thu Oct 20 23:04:11 2011
logfile /var/svc/log/network-ldap-client:default.log
restarter svc:/system/svc/restarter:default
contract_id
manifest /lib/svc/manifest/network/ldap/client.xml
manifest /lib/svc/manifest/milestone/config.xml
manifest /lib/svc/manifest/network/network-location.xml
manifest /lib/svc/manifest/system/name-service/upgrade.xml
dependency optional_all/none svc:/milestone/config (online)
dependency optional_all/none svc:/network/location:default (online)
dependency require_all/none svc:/system/filesystem/minimal (online)
dependency require_all/none svc:/network/initial (online)
dependency require_all/restart svc:/network/nis/domain (online)
dependency optional_all/none svc:/system/manifest-import (online)
dependency require_all/none svc:/milestone/unconfig (online)
dependency optional_all/none svc:/system/name-service/upgrade (online)
cachemgr configuration:
server debug level 0
server log file "/var/ldap/cachemgr.log"
number of calls to ldapcachemgr 2144
SMF service state: online
82 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Monitoring LDAP Client Status
For more information about the ldap_cachemgr daemon, see the ldap_cachemgr(8) man page.
■ To display the contents of the specific database, use the ldaplist database command, for
example, ldaplist passwd username or ldaplist host hostname.
For a list of options and filters that you can use with the ldapsearch command, see the
ldapsearch(1oldap) man page.
# svcs name-service/cache
STATE STIME FMRI
online 10:58:21 svc:/system/name-service/cache:default
The access to LDAP credentials is restricted to users and programs that have the solaris.smf.
value.name-service.ldap.client authorization. Without this authorization, a user can only
see LDAP server lookups that do not require credentials. This situation also affects any tool that
uses the LDAP naming service configuration, such as ldaplist.
84 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
LDAP Configuration Problems and Solutions
Note that any user can use the getent command to retrieve LDAP information. Such lookups
occur inside nscd, which has access to the credentials.
The LDAP client software returns fully qualified host names for host lookups, such as host
names returned by gethostbyname() and getaddrinfo().
■ If the name stored is qualified, that is, if it contains at least one dot, the client returns the
name as is. For example, if the name stored is hostB.eng, the returned name is hostB.eng.
■ If the name stored in the LDAP directory is not qualified, that is, it does not contain a dot,
the client appends the domain part to the host name as set in the nisDomain attribute set
at the root DN in the object class of nisDomainObject. For example, if the name stored is
hostA, the returned name is hostA.domain-name.
If the DNS domain name is different from the LDAP domain name, then the LDAP naming
service cannot be used to serve host names unless the host names are stored as fully qualified
names.
LDAP clients use the PAM modules for user authentication during login. When using the
standard UNIX PAM module, the password is read from the server and checked on the client
side. This process can fail for any of the following reasons:
■ ldap is not associated with the passwd database in the name service switch.
■ The proxy agent cannot read the user's userPassword attribute on the server list. You
must enable at least the proxy agent to read the password because the proxy agent returns
the password to the client for comparison. pam_ldap does not require read access to the
password.
■ The proxy agent does not have the correct password.
■ The entry does not have the shadowAccount object class.
■ No password is defined for the user.
Make sure the user's userPassword attribute exists.
■ LDAP Server TLS Connection issues.
Ensure that either a local /etc/hosts or DNS entry (if nsswitch.conf is configured for
DNS) exists for the LDAP server and that the X.509 Certificate CN attribute of the Subject
DN or subjectAltName extension in the X.509 certificate matches that /etc/hosts or DNS
entry for the configured LDAP server.
To determine what certificate the server has configured, you can attempt connection by
using the openssl command:
# /usr/lib/ldap/ldap_cachemgr -g
■ pam.conf is configured incorrectly.
■ The user is not defined in the LDAP namespace.
■ NS_LDAP_CREDENTIAL_LEVEL is set to anonymous for the pam_unix_* modules, and
userPassword is not available to anonymous users.
■ The password is not stored in crypt format.
■ If pam_ldap is configured to support account management, a login failure could be the result
of one of the following causes:
■ The user's password has expired.
■ The user's account is locked out due to too many failed login attempts.
■ The user's account has been deactivated by the administrator.
■ The user tried to log in using a non-password based program, such as ssh or sftp.
■ If you are using per-user authentication and sasl/GSSAPI, then some component of
Kerberos or the pam_krb5 configuration might be set up incorrectly. For more information
about resolving Kerberos issues, see the Managing Kerberos in Oracle Solaris 11.4.
86 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
LDAP Configuration Problems and Solutions
As a troubleshooting aid, use snoop on the client's network interface to see what sort of traffic is
going out, and determine the server to which it is talking.
As the root user, you can use the -l log-file option to specify an alternate log file for
ldap_cachemgr instead of the default /var/ldap/cachemgr.log log file. In addition, you
can use the -d value option to enable or disable debugging in the running ldap_cachemgr
process. A value of 0 disables debugging and the values 1 through 6 show increasingly detailed
information.
Also check the server list attributes either in the profile or from the command line and make
sure that the server information is correct.
libsldap: Status: 7 Mesg: openConnection: GSSAPI bind failed -82 Local error
Kerberos might not be initialized or its ticket is expired. Use the klist command to browse.
Use either the kinit -p command or kinit -R command to reinitialize Kerberos.
88 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Resolving Per-User Credentials Issues
■ The root host entry or the user entry is not in the LDAP directory.
■ Mapping rules are incorrect.
# svcs -l dns/client
# svcadm enable dns/client
■ If the failure is in the bind operation of sasl/GSSAPI, check the syslog file to determine the
problem.
LDAP Schemas
This chapter describes LDAP schemas and the different types of schemas supported by Oracle
Solaris. It covers the following topics:
■ “IETF Schemas for LDAP” on page 91
■ “Directory User Agent Profile (DUAProfile) Schema” on page 98
■ “Oracle Solaris Schemas” on page 100
■ “Internet Print Protocol Information for LDAP” on page 103
For a directory server to support LDAP naming clients, the schemas defined in this section must
be configured in the server unless schema is mapped using the schema mapping feature of the
clients.
IETF defines several LDAP schemas: the RFC 2307 Network Information Service (NIS)
schema and RFC 2307bis, and a Configuration Profile Schema for LDAP-Based Agents (RFC
4876), and the LDAP Schema for Printer Services. To support NIS services, you must add the
definition of these schemas to the directory server. You can access the RFCs on the IETF web
site at https://www.ietf.org.
Note - Internet drafts, such as RFC 2307bis, are draft documents valid for a maximum of six
months and might be updated, or rendered obsolete, by other documents at any time.
The nisSchema OID is 1.3.6.1.1. The RFC 2307bis attributes are as follows:
92 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
IETF Schemas for LDAP
94 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
IETF Schemas for LDAP
EQUALITY caseExactIA5Match
SUBSTR caseExactIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
96 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
IETF Schemas for LDAP
The original LDAP mail groups schema contains a large number of attributes and object classes.
LDAP clients use only two attributes and a single object class. The mail alias attributes are as
follows:
( 0.9.2342.19200300.100.1.3
NAME 'mail'
DESC 'RFC822 email address for this person'
EQUALITY caseIgnoreIA5Match
SYNTAX 'IA5String(256)'
SINGLE-VALUE )
( 2.16.840.1.113730.3.1.30
NAME 'mgrpRFC822MailMember'
DESC 'RFC822 mail address of email only member of group'
EQUALITY CaseIgnoreIA5Match
SYNTAX 'IA5String(256)' )
98 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Directory User Agent Profile (DUAProfile) Schema
SINGLE-VALUE )
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
Projects Schema
The /etc/project file is a local source of attributes associated with projects. For more
information, see the user_attr(5) man page.
100 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Oracle Solaris Schemas
You can add the SolarisQualifiedUserAttr object class to the existing Oracle Solaris RBAC
schema. You can specify multiple values to the attributes of this class and thus enhance the
current SolarisUserQualifier class. If you already have an existing LDAP configuration prior
to the availability of the SolarisQualifiedUserAttr class, you can use the ldapadd command
to add the class to the configuration.
EQUALITY caseIgnoreIA5Match
SYNTAX 'IA5String' SINGLE-VALUE )
102 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Internet Print Protocol Information for LDAP
( 1.3.18.0.2.4.1140
NAME 'printer-uri'
DESC 'A URI supported by this printer.
This URI SHOULD be used as a relative distinguished name (RDN).
( 1.3.18.0.2.4.1107
NAME 'printer-xri-supported'
DESC 'The unordered list of XRI (extended resource identifiers) supported
by this printer.
Each member of the list consists of a URI (uniform resource identifier)
followed by optional authentication and security metaparameters.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
( 1.3.18.0.2.4.1135
NAME 'printer-name'
DESC 'The site-specific administrative name of this printer, more end-user
friendly than a URI.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE )
( 1.3.18.0.2.4.1119
NAME 'printer-natural-language-configured'
DESC 'The configured language in which error and status messages will be
generated (by default) by this printer.
Also, a possible language for printer string attributes set by operator,
system administrator, or manufacturer.
Also, the (declared) language of the "printer-name", "printer-location",
"printer-info", and "printer-make-and-model" attributes of this printer.
For example: "en-us" (US English) or "fr-fr" (French in France) Legal values of
language tags conform to [RFC3066] "Tags for the Identification of Languages".'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE )
( 1.3.18.0.2.4.1136
NAME 'printer-location'
DESC 'Identifies the location of the printer. This could include
things like: "in Room 123A", "second floor of building XYZ".'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
104 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Internet Print Protocol Information for LDAP
( 1.3.18.0.2.4.1139
NAME 'printer-info'
DESC 'Identifies the descriptive information about this printer.
This could include things like: "This printer can be used for
printing color transparencies for HR presentations", or
"Out of courtesy for others, please print only small (1-5 page)
jobs at this printer", or even "This printer is going away on July 1, 1997,
please find a new printer".'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127}
SINGLE-VALUE )
( 1.3.18.0.2.4.1134
NAME 'printer-more-info'
DESC 'A URI used to obtain more information about this specific printer.
For example, this could be an HTTP type URI referencing an HTML page
accessible to a Web Browser.
The information obtained from this URI is intended for end user consumption.'
EQUALITY caseIgnoreMatch ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
( 1.3.18.0.2.4.1138
NAME 'printer-make-and-model'
DESC 'Identifies the make and model of the device.
The device manufacturer MAY initially populate this attribute.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE )
( 1.3.18.0.2.4.1133
NAME 'printer-ipp-versions-supported'
DESC 'Identifies the IPP protocol version(s) that this printer supports,
including major and minor versions,
i.e., the version numbers for which this Printer implementation meets
the conformance requirements.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} )
( 1.3.18.0.2.4.1132
NAME 'printer-multiple-document-jobs-supported'
DESC 'Indicates whether or not the printer supports more than one
document per job, i.e., more than one Send-Document or Send-Data
operation with document data.'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
( 1.3.18.0.2.4.1109
NAME 'printer-charset-configured'
DESC 'The configured charset in which error and status messages will be
generated (by default) by this printer.
Also, a possible charset for printer string attributes set by operator,
system administrator, or manufacturer.
For example: "utf-8" (ISO 10646/Unicode) or "iso-8859-1" (Latin1).
Legal values are defined by the IANA Registry of Coded Character Sets and
the "(preferred MIME name)" SHALL be used as the tag.
For coherence with IPP Model, charset tags in this attribute SHALL be
lowercase normalized.
This attribute SHOULD be static (time of registration) and SHOULD NOT be
dynamically refreshed attributetypes: (subsequently).'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} SINGLE-VALUE )
( 1.3.18.0.2.4.1131
NAME 'printer-charset-supported'
DESC 'Identifies the set of charsets supported for attribute type values of
type Directory String for this directory entry.
For example: "utf-8" (ISO 10646/Unicode) or "iso-8859-1" (Latin1).
Legal values are defined by the IANA Registry of Coded Character Sets and
the preferred MIME name.'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} )
( 1.3.18.0.2.4.1137
NAME 'printer-generated-natural-language-supported'
DESC 'Identifies the natural language(s) supported for this directory entry.
For example: "en-us" (US English) or "fr-fr" (French in France).
Legal values conform to [RFC3066], Tags for the Identification of Languages.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} )
( 1.3.18.0.2.4.1130
NAME 'printer-document-format-supported'
DESC 'The possible document formats in which data may be interpreted
and printed by this printer.
Legal values are MIME types come from the IANA Registry of Internet Media Types.'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} )
( 1.3.18.0.2.4.1129
NAME 'printer-color-supported'
DESC 'Indicates whether this printer is capable of any type of color printing
at all, including highlight color.'
106 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Internet Print Protocol Information for LDAP
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
( 1.3.18.0.2.4.1128
NAME 'printer-compression-supported'
DESC 'Compression algorithms supported by this printer.
For example: "deflate, gzip". Legal values include; "none", "deflate"
attributetypes: (public domain ZIP), "gzip" (GNU ZIP), "compress" (UNIX).'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} )
( 1.3.18.0.2.4.1127
NAME 'printer-pages-per-minute'
DESC 'The nominal number of pages per minute which may be output by this
printer (e.g., a simplex or black-and-white printer).
This attribute is informative, NOT a service guarantee.
Typically, it is the value used in marketing literature to describe this printer.'
EQUALITY integerMatch
ORDERING integerOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
DESC 'The number of impression sides (one or two) and the two-sided impression
rotations supported by this printer.
Legal values include; "one-sided", "two-sided-long-edge", "two-sided-short-edge".'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} )
108 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Internet Print Protocol Information for LDAP
ORDERING integerOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
( 1.3.18.0.2.4.1118
NAME 'printer-copies-supported'
DESC 'The maximum number of copies of a document that may be printed as a single job.
A value of "0" indicates no maximum limit.
A value of "-1" indicates unknown.'
EQUALITY integerMatch
ORDERING integerOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
( 1.3.18.0.2.4.1111
NAME 'printer-job-k-octets-supported'
DESC 'The maximum size in kilobytes (1,024 octets actually) incoming print job that
this printer will accept.
A value of "0" indicates no maximum limit. A value of "-1" indicates unknown.'
EQUALITY integerMatch
ORDERING integerOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
( 1.3.18.0.2.4.1113
NAME 'printer-service-person'
DESC 'The name of the current human service person responsible for servicing this
printer.
It is suggested that this string include information that would enable other humans
to reach the service person, such as a phone number.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127}
SINGLE-VALUE )
( 1.3.18.0.2.4.1114
NAME 'printer-delivery-orientation-supported'
DESC 'The possible delivery orientations of pages as they are printed and ejected
from this printer.
Legal values include; "unknown", "face-up", and "face-down".'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} )
( 1.3.18.0.2.4.1115
NAME 'printer-stacking-order-supported'
DESC 'The possible stacking order of pages as they are printed and ejected from
this printer.
Legal values include; "unknown", "first-to-last", "last-to-first".'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} )
( 1.3.18.0.2.4.1116
NAME 'printer-output-features-supported'
( 1.3.18.0.2.4.1108
NAME 'printer-aliases'
DESC 'Site-specific administrative names of this printer in addition the printer
name specified for printer-name.'
EQUALITY caseIgnoreMatch
ORDERING caseIgnoreOrderingMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} )
( 1.3.6.1.4.1.42.2.27.5.1.63
NAME 'sun-printer-bsdaddr'
DESC 'Sets the server, print queue destination name and whether the client generates
protocol extensions.
"Solaris" specifies a Solaris print server extension. The value is represented b the
following value: server "," destination ", Solaris".'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE )
( 1.3.6.1.4.1.42.2.27.5.1.64
NAME 'sun-printer-kvp'
DESC 'This attribute contains a set of key value pairs which may have meaning to the
print subsystem or may be user defined.
Each value is represented by the following: key "=" value.'
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
objectclasses: ( 1.3.18.0.2.6.254
NAME 'slpServicePrinter'
DESC 'Service Location Protocol (SLP) information.'
AUXILIARY SUP 'slpService')
objectclasses: ( 1.3.18.0.2.6.258
NAME 'printerAbstract'
DESC 'Printer related information.'
ABSTRACT SUP 'top' MAY ( printer-name
$ printer-natural-language-configured
110 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Internet Print Protocol Information for LDAP
$ printer-location
$ printer-info
$ printer-more-info
$ printer-make-and-model
$ printer-multiple-document-jobs-supported
$ printer-charset-configured
$ printer-charset-supported
$ printer-generated-natural-language-supported
$ printer-document-format-supported
$ printer-color-supported
$ printer-compression-supported
$ printer-pages-per-minute
$ printer-pages-per-minute-color
$ printer-finishings-supported
$ printer-number-up-supported
$ printer-sides-supported
$ printer-media-supported
$ printer-media-local-supported
$ printer-resolution-supported
$ printer-print-quality-supported
$ printer-job-priority-supported
$ printer-copies-supported
$ printer-job-k-octets-supported
$ printer-current-operator
$ printer-service-person
$ printer-delivery-orientation-supported
$ printer-stacking-order-supported $ printer! -output-features-supported ))
objectclasses: ( 1.3.18.0.2.6.255
NAME 'printerService'
DESC 'Printer information.'
STRUCTURAL SUP 'printerAbstract' MAY ( printer-uri
$ printer-xri-supported ))
objectclasses: ( 1.3.18.0.2.6.257
NAME 'printerServiceAuxClass'
DESC 'Printer information.'
AUXILIARY SUP 'printerAbstract' MAY ( printer-uri $ printer-xri-supported ))
objectclasses: ( 1.3.18.0.2.6.256
NAME 'printerIPP'
DESC 'Internet Printing Protocol (IPP) information.'
AUXILIARY SUP 'top' MAY ( printer-ipp-versions-supported $
printer-multiple-document-jobs-supported ))
objectclasses: ( 1.3.18.0.2.6.253
NAME 'printerLPR'
DESC 'LPR information.'
AUXILIARY SUP 'top' MUST ( printer-name ) MAY ( printer-aliases))
objectclasses: ( 1.3.6.1.4.1.42.2.27.5.2.14
NAME 'sunPrinter'
DESC 'Sun printer information'
SUP 'top' AUXILIARY MUST (objectclass $ printer-name) MAY
(sun-printer-bsdaddr $ sun-printer-kvp))
Printer Attributes
ATTRIBUTE ( 1.3.6.1.4.1.42.2.27.5.1.63
NAME sun-printer-bsdaddr
DESC 'Sets the server, print queue destination name and whether the
client generates protocol extensions. "Solaris" specifies a
Solaris print server extension. The value is represented by
the following value: server "," destination ", Solaris".'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE
)
ATTRIBUTE ( 1.3.6.1.4.1.42.2.27.5.1.64
NAME sun-printer-kvp
DESC 'This attribute contains a set of key value pairs which may have
meaning to the print subsystem or may be user defined. Each
value is represented by the following: key "=" value.'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
112 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
♦ ♦ ♦
8
C H A P T E R 8
This chapter describes how to enable support of NIS clients that use naming information stored
in the LDAP directory. By following the procedures in this chapter, you can transition from
using an NIS naming service to using the LDAP naming service.
For information about the benefits of transitioning to LDAP, see “Overview of the LDAP
Naming Service” on page 11.
Note - The recommended and more cost effective procedure is to avoid using NIS-to-LDAP.
First, set up your LDAP infrastructure; then, reconfigure your systems to directly use the LDAP
infrastructure.
See the announcement about "Network Information Name Service (NIS)" in End of Features
(EOF) Planned for Future Releases of Oracle Solaris (https://www.oracle.com/solaris/
technologies/end-of-feature-notices-solaris11.html#futurereleases).
The NIS-to-LDAP ("N2L" transition service replaces existing NIS daemons on the NIS master
server with N2L transition daemons. The N2L service also creates an N2L mapping file on the
NIS server. The mapping file specifies the mapping between NIS map entries and equivalent
DIT entries in LDAP. An NIS master server that has gone through this transition is known as an
N2L server. The slave servers do not have an NISLDAPmapping file, so they continue to function
in the usual manner. The slave servers periodically update their data from the N2L server as if it
were a regular NIS master.
The behavior of the N2L service is controlled by the ypserv and NISLDAPmapping configuration
files. The inityp2l script assists the server with the initial setup of these configuration files.
Once the N2L server has been established, you can edit the configuration file to maintain the
N2L service.
In the context of the N2L service, the term "map" is used in the following ways:
■ To refer to a database file in which NIS stores a specific type of information
■ To describe the process of mapping NIS information to or from the LDAP DIT
In any naming system, only one source of information can be the authoritative source. In
traditional NIS, NIS sources are the authoritative information. When you use the N2L service,
the source of authoritative data is the LDAP directory. The directory is managed by using
directory management tools. For more information about directory management tools, see
Chapter 1, “Introduction to the LDAP Naming Service”.
NIS sources are retained for emergency backup or backout only. After you use the N2L service,
you must phase out NIS clients. Eventually, all NIS clients should be replaced by LDAP
naming service clients.
The Service Management Facility (SMF) manages the NIS and LDAP services. You can
perform administrative actions on these services, such as enabling, disabling, or restarting, by
using the svcadm command. You can query the status of services by using the svcs command.
For more information about using SMF with LDAP and NIS, see “LDAP and the Service
Management Facility” on page 72 and “NIS and the Service Management Facility” in Working
With Oracle Solaris 11.4 Directory and Naming Services: DNS and NIS. For information about
SMF, refer to Managing System Services in Oracle Solaris 11.4. Also refer to the svcadm(8) and
svcs(1) man pages for more details.
114 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
About the NIS-to-LDAP Service
You need to be familiar with NIS and LDAP concepts, terminology, and IDs to perform the
procedures in this chapter. For more information about the NIS and LDAP naming service, see
the following sections:
■ Chapter 5, “About the Network Information Service” in Working With Oracle Solaris 11.4
Directory and Naming Services: DNS and NIS, for an overview of NIS
■ Chapter 1, “Introduction to the LDAP Naming Service”, for an overview of LDAP
Installing the files that are related to the N2L service does not change the NIS server's default
behavior. While installing the N2L service, you may see some changes to the NIS man pages
and the addition of N2L helper scripts, inityp2l and ypmap2src, on the servers. However, as
long as inityp2l is not run or the N2L configuration files are not created manually on the NIS
server, the NIS components continue to start in traditional NIS mode and function as usual.
After inityp2l is run, users see some changes in server and client behavior. The following
table lists the NIS and LDAP user types and a description of what each type of user should
notice after the N2L service is deployed.
If an N2L server cannot bind to the LDAP server for a read, the N2L server returns
the information from its own cached copy. Alternatively, the N2L server can return an
internal server error. You can configure the N2L server to respond either way. For more
information, see the ypserv(8) man page.
All users When an NIS client makes a password change request, the change is immediately
visible on the N2L master server and to native LDAP clients.
If you attempt to change a password on the NIS client and the LDAP server is
unavailable, then the change is refused and the N2L server returns an internal server
error. This behavior prevents incorrect information from being written into the cache.
This section describes the utilities, configuration files, and mapping associated with the N2L
transition.
116 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
About the NIS-to-LDAP Service
The N2L service uses the following files to transition from NIS to LDAP:
■ /var/yp/NISLDAPmapping – Specifies the mapping between NIS map entries and equivalent
DIT entries in LDAP. See the NISLDAPmapping(5) man page.
■ /var/yp/ypserv – Specifies configuration information for the N2L transition daemons. For
more information, see the ypserv(5) man page.
When the N2L transition is implemented, the yppasswdd command uses the ageing.byname
mapping to read and write password aging information to the DIT.
The N2L service also supports automatic mapping of the auto.* maps. However, because
most auto.* file names and contents are specific to each network configuration, those files are
not specified in the list of standard maps. The exceptions are the auto.home and auto.master
maps, which are supported as standard maps.
services.byname services.byservicename
timezone.byname
user_attr
During the N2L transition, the yppasswdd daemon uses the ageing.byname map to read and
write password aging information to the DIT. If you are not using password aging, then the
ageing.byname mapping is ignored.
118 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Setting Up the NIS-to-LDAP Service
■ Make sure that the system is set up as a working traditional NIS server before running the
inityp2l script to enable N2L mode.
■ Configure the LDAP directory server on your system.
The N2L migration tools support OUD and compatible versions of directory servers
offered by Oracle. The N2L migration tools also support OpenLDAP. If you use an
OUD or OpenLDAP directory server, use the ldapservercfg command to configure the
server before you set up the N2L service. For more information about the ldapservercfg
command, see Chapter 4, “Setting Up an Oracle Unified Directory Server or OpenLDAP
Server” and the ldapservercfg(8) man page.
Although other third-party LDAP servers might work with the N2L service, they are not
supported by Oracle. If you are using an LDAP server other than OpenLDAP directory
server or OUD or compatible Oracle servers, you must manually configure the server to
support the schemas of RFC 2307bis, RFC 4876, or later standards before you set up the
N2L service.
■ Use files before dns for the config/host property.
■ Ensure that the addresses of the N2L master server and the LDAP server are present in the
hosts file on the N2L master server.
An alternative solution is to list the LDAP server address in ypserv, rather than its host
name. Because the LDAP server address is listed in another place, changing the address of
either the LDAP server or the N2L master server requires additional file modifications.
You can use the standard mappings or custom mappings to set up the N2L service, as described
in the procedures in this section.
As part of the NIS-to -LDAP conversion, you need to run the inityp2l command. This
command runs an interactive script for which you must provide configuration information. For
more information about the types of information you need to provide for configuration, see the
ypserv(8) man page. This information typically includes:
■ The name of the configuration file being created. The default configuration file is /etc/
default/ypserv.
■ The DN that stores configuration information in LDAP. The default value is ypserv.
■ Preferred server list for mapping data to LDAP.
■ Preferred server list for mapping data from LDAP.
■ Authentication method for mapping data to LDAP.
■ Authentication method for mapping data from LDAP.
Before You Begin Complete the prerequisite steps that are listed in “Prerequisites for the NIS-to-LDAP
Transition” on page 118.
120 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Set Up the N2L Service With Standard Mappings
Run the inityp2l script on the NIS master server and follow the prompts. inityp2l sets
up the configuration and mapping files for standard and auto.* maps. For information
about the list of the information you need to provide, see “Setting Up the NIS-to-LDAP
Service” on page 119.
3. Determine whether the LDAP DIT is fully initialized for the transition from the NIS
source files.
The DIT is fully initialized if it already contains the information necessary to populate all the
maps that are listed in the NISLDAPmapping file.
■ If the LDAP DIT is fully initialized, initialize the NIS maps.
1. Stop the NIS service.
# svcadm disable network/nis/server:default
2. Initialize the NIS maps from information in the DIT.
# ypserv -r
4. Start the DNS and NIS services to ensure that they use the new maps.
■ The maps you want to use are not listed in “Supported Standard Mappings” on page 117.
■ Standard NIS maps need to be mapped to non-RFC 2307 LDAP mappings.
Before You Begin Complete the prerequisite steps that are listed in “Prerequisites for the NIS-to-LDAP
Transition” on page 118.
# inityp2l
Run the inityp2l script on the NIS master server and follow the prompts. For the
list of the information that you need to provide, see “Setting Up the NIS-to-LDAP
Service” on page 119.
5. Initialize the DIT for the transition from the NIS source files.
# cd /var/yp
122 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Set Up the N2L Service With Custom or Nonstandard Mappings
# make
c. Copy the NIS maps to the DIT, then initialize N2L support for the maps.
# ypserv -Ir
Tip - The original NIS dbm files are not overwritten. You can recover these files if needed.
d. Start the DNS and NIS service to ensure that they use the new maps.
# svcadm enable network/dns/client:default
# svcadm enable network/nis/server:default
Tip - The original NIS dbm files are not overwritten. You can recover these files if needed.
c. Start the DNS and NIS service to ensure that they use the new maps.
# svcadm enable network/dns/client:default
# svcadm enable network/nis/server:default
If the entries are incorrect, then the entries cannot be found by LDAP naming service clients.
# makedbm -u LDAP_servdate.bynumber
plato: 1/3/2001
johnson: 2/4/2003,1/3/2001
yeats: 4/4/2002
poe: 3/3/2002,3/4/2000
If the contents are as expected, the transition from NIS to LDAP was successful.
Examples in this section show how you might customize maps. Use your preferred text editor to
modify the /var/yp/NISLDAPmapping file as needed. For more information about file attributes
and syntax, see the NISLDAPmapping(5) man page. For more information about the LDAP
naming service, see Chapter 1, “Introduction to the LDAP Naming Service”.
This example shows how to move host entries from the default location to another location in
the DIT by changing the nisLDAPobjectDN attribute in the NISLDAPmapping file to the new base
LDAP distinguished name (DN). For this example, the internal structure of the LDAP objects is
unchanged, so objectClass entries are also unchanged..
Change:
nisLDAPobjectDN hosts: \
ou=hosts,?one?, \
objectClass=device, \
objectClass=ipHost
to:
nisLDAPobjectDN hosts: \
ou=newHosts,?one?, \
objectClass=device, \
124 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Set Up the N2L Service With Custom or Nonstandard Mappings
objectClass=ipHost
This change causes entries to be mapped under dn: ou=newHosts, dom=domain1, dc=sun,
dc=com, instead of dn: ou=hosts, dom=domain1, dc=sun, dc=com.
In this example the servdate.bynumber map contains information about the servicing dates for
systems. This map is indexed by the system’s serial number, which in this example is 123. Each
entry consists of the system owner’s name, a colon, and a comma-separated list of service dates,
such as John Smith:1/3/2001,4/5/2003.
The old map structure is to be mapped onto LDAP entries of the following form:
dn: number=123,ou=servdates,dc=... \
number: 123 \
userName: John Smith \
date: 1/3/2001 \
date: 4/5/2003 \
.
.
.
objectClass: servDates
By examining the NISLDAPmapping file, you can see that the mapping closest to the required
pattern is group. The custom mappings can be modeled on the group mapping. Because there is
only one map, no nisLDAPdatabaseIdMapping attribute is required. The attributes to be added
to NISLDAPmapping are as follows:
nisLDAPentryTtl servdate.bynumber:1800:5400:3600
nisLDAPnameFields servdate.bynumber: \
("%s:%s", uname, dates)
nisLDAPobjectDN servdate.bynumber: \
ou=servdates, ?one? \
objectClass=servDates:
nisLDAPattributeFromField servdate.bynumber: \
dn=("number=%s,", rf_key), \
number=rf_key, \
userName=uname, \
(date)=(dates, ",")
nisLDAPfieldFromAttribute servdate.bynumber: \
rf_key=number, \
uname=userName, \
dates=("%s,", (date), ",")
The N2L service supports OUD. Although other third-party LDAP servers might work with the
N2L service, they are not supported by Oracle. If you are using an LDAP server other than an
OUD server or compatible Oracle servers, you must manually configure the server to support
the schemas of RFC 2307, RFC 2307bis and RFC 4876, or later standards.
If you are using OUD, you can enhance the directory server to improve performance. To make
these enhancements, you must have LDAP administrator privileges on the OUD server. In
addition, you must coordinate with the LDAP clients if the directory server need to be rebooted.
The OUD documentation is available at Oracle Unified Directory documentation.
For large maps, you must use the LDAP virtual list view (VLV) indexes to ensure that LDAP
searches return complete results. For information about setting up VLV indexes on OUD, see
the Oracle Unified Directory documentation.
VLV search results use a fixed page size of 50000. If you are using VLVs with OUD, ensure
that both the LDAP server and N2L server are able to handle transfers of this size. If all of your
maps are known to be smaller than this limit, you do not need to use VLV indexes. However,
if your maps are larger than the size limit or you are unsure of the size of all maps, use VLV
indexes to avoid incomplete returns.
If you are using VLV indexes, set up the appropriate size limits as follows:
■ On the OUD server, ensure that the nsslapd-sizelimit attribute is set to greater than or
equal to 50000 or -1. For more information, see the ldapservercfg(8) man page.
■ On the N2L server, ensure that the nisLDAPsearchSizelimit attribute is set to either greater
than or equal to 50000 or zero. For more information, see the NISLDAPmapping(5) man page.
After VLV indexes have been created, activate them by running dsadm with the vlvindex
option on the OUD server. For more information, see the dsadm(8) man page.
126 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
NIS-to-LDAP Best Practices With Oracle Unified Directory
VLVs are domain specific, so each time ldapservercfg is run, VLVs are created for one NIS
domain. Therefore, during the N2L transition, you must run ldapservercfg once for each
nisLDAPdomainContext attribute included in the NISLDAPmapping file.
When the N2L server refreshes a map, the result might require a lengthy LDAP directory
access. If OUD is not correctly configured, the refresh operation might time out before
completion. To avoid directory server timeouts, modify OUD attributes manually or by running
the ldapservercfg command.
For example, you might want to modify the following attributes to increase the minimum
amount of time in seconds that the server should spend performing the search request:
dn: cn=config
nsslapd-timelimit: -1
For testing purposes, you can use an attribute value of -1, which indicates no limit. When you
have determined the optimum limit value, change the attribute value. Do not maintain any
attribute settings at -1 on a production server. With no limits, the server might be vulnerable to
Denial of Service attacks.
For more information about configuring OUD with LDAP, see Chapter 4, “Setting Up an Oracle
Unified Directory Server or OpenLDAP Server”.
To avoid buffer overruns, modify the following attributes manually or by running the
ldapservercfg command.
This example shows how to set attributes to increase the maximum number of entries that are
returned for a client search query.
dn: cn=config
changetype: modify
replace: olcSizeLimit
olcSizeLimit: -1
The attribute value -1 indicates no limit. A value of -1 can be used for testing purposes. When
you have determined the optimum limit value, change the attribute value.
Note - Do not maintain any attribute settings at -1 on a production server. With no limits, the
server might be vulnerable to Denial of Service attacks.
If VLVs are being used, the sizelimit attribute values should be set as defined in “Creating
Virtual List View Indexes With Oracle Unified Directory” on page 126. If VLVs are not
being used, the size limit should be set large enough to accommodate the largest container.
128 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
NIS-to-LDAP Restrictions
This example shows how to set attributes to increase the maximum number of entries that are
verified for a client search query.
The following example is specific to OUD. OpenLDAP does not have an equivalent to the
lookthrough-limit attribute.
dn: cn=MyRootUser,cn=Root DNs,cn=config
changetype: modify
add: ds-rlim-lookthrough-limit
ds-rlim-lookthrough-limit: -1
NIS-to-LDAP Restrictions
When the N2L server has been set up, the NIS source files are no longer used. Therefore, do
not run ypmake on an N2L server. If ypmake is accidentally run, such as for an existing cron job,
the N2L service is unaffected. However, a warning is logged suggesting that yppush should be
called explicitly.
NIS-to-LDAP Troubleshooting
The N2L server might log errors that relate to internal LDAP problems, resulting in LDAP-
related error messages. Although the errors are nonfatal, they indicate that you need to
investigate the problems. The N2L server might continue to operate but provide out-of-date or
incomplete results.
This section describes some of the common LDAP error messages that you might encounter
when implementing the N2L service. It also includes error descriptions and possible causes and
solutions for the errors.
Cause: AnLDAP search was larger than the limit allowed by the directory server's nsslapd-
sizelimit attribute. The search returns partial information.
Solution: Increase the value of the nsslapd-sizelimit attribute or implement a VLV index
for the failing search.
Invalid DN Syntax
Error Number: 34
Cause: An attempt has been made to write an LDAP entry with a DN that contains illegal
characters. The N2L server attempts to escape illegal characters, such as the + symbol, that
are generated in DNs.
Solution: Checkthe LDAP server error log to find out which illegal DNs were written and
modify the NISLDAPmapping file that generated the illegal DNs.
Cause: An attempt has been made to write an LDAP entry that is invalid. Generally,
this error is due to missing MUST attributes that can be caused by either of the following
circumstances:
■ Bugs in the NISLDAPmapping file that create entries with missing attributes
■ Attempts to add an AUXILIARY attribute to an object that does not exist
For example, if a user name has not yet been created from the passwd.byxxx map, an
attempt to add auxiliary information to that user will fail.
Solution: Forbugs in the NISLDAPmapping file, check the information in the server error log
to determine the nature of the problem.
Cause: The ypserv file might be incorrectly configured to point to the wrong LDAP
directory server. Alternatively, the directory server might not be running.
130 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
NIS-to-LDAP Troubleshooting
■ Type the following command to confirm that the LDAP server is running:
If there are problems with the LDAP server, the following message is displayed:
Directory accessible
Timeout
Error Number: 85
Cause: An LDAP operation timed out while updating a map from the DIT. The map might
now contain out-of-date information.
NIS-to-LDAP Issues
This section describes problems that could occur while running the N2L server and provides
possible causes and solutions.
The mapping file, NISLDAPmapping, is complex. Different issues might cause the mapping to
behave in unexpected ways. Use the described techniques to resolve such problems.
Description: A simple message is displayed on the console and the server exits (a detailed
description is written to syslog).
Description: When ypserv or other NIS daemons run, an LDAP-related error message is
logged and the daemon exits.
Solution: Examine
the error log on the LDAP server. For the information about LDAP errors,
see “Common LDAP Error Messages” on page 129.
Description: NIS operations do not return the expected results but no errors are logged.
Cause: Incorrect entries might exist in the LDAP or NIS maps, which results in mappings not
completing as intended.
Solution: Check and correct entries in the LDAP DIT and in the N2L versions of the NIS
maps.
1. Check that the correct entries exist in the LDAP DIT, and fix the entries as needed.
If you are using OUD, start the management console by running the dsadm
startconsole command.
2. Check that the N2L versions of the NIS maps in the /var/yp directory contain the
expected entries by comparing the newly generated map to the original map. Fix entries
as needed.
# cd /var/yp/domain-name
# makedbm -u test.byname
Be aware of the following when checking the output for the maps:
■ The order of entries might not be the same in both files.
Use the sort command before comparing output.
■ The use of white space might not be the same in both files.
Use the diff -b command when comparing output.
132 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
NIS-to-LDAP Troubleshooting
Cause: When the ypserv -i command is run, each NIS map is read and its contents are
written into the DIT. Several maps might contribute attributes to the same DIT object.
Generally, one map creates most of the object, including all of the object's MUST attributes.
Other maps contribute additional MAY attributes.
Maps are processed in the same order that nisLDAPobjectDN attributes appear in the
NISLDAPmapping file. If maps containing MAY attributes get processed before maps containing
MUST attributes, then object class violations occur. For more information about this error, see
“Common LDAP Error Messages” on page 129.
Solution: Reorder the nisLDAPobjectDN attributes so that maps are processed in the correct
order.
As a temporary fix, rerun the ypserv -i command several times. Each time the command is
executed, the LDAP entry approaches a complete state.
Note - Mapping in such a way that all of an object's MUST attributes cannot be created from at
least one map is not supported.
Cause: When the N2L server refreshes a map, the result might require a single lengthy access
of a large LDAP directory. If OUD is not correctly configured, this operation might time out
before completion.
Solution: Toavoid directory server timeouts, modify the OUD attributes manually or
by running the ldapservercfg command. For more information, see “Common LDAP
Error Messages” on page 129 and “NIS-to-LDAP Best Practices With Oracle Unified
Directory” on page 126.
The ypserv command starts but does not respond to NIS requests.
Cause: The N2L server lock files are not correctly synchronizing access to the NIS maps.
# rm /var/run/yp_maplock /var/run/yp_mapupdate
3. Restart the NIS server.
Cause: If the addresses of the N2L master server and the LDAP server are not listed
properly in the hosts, ipnodes, or ypserv files, a deadlock might result. For more
information about address configuration for N2L, see “Prerequisites for the NIS-to-LDAP
Transition” on page 118.
For an example of a deadlock scenario, consider the following sequence of events:
Solution: Listthe addresses of the N2L master server and the LDAP server in the hosts
or ipnodes files on the N2L master server. Whether the server addresses must be listed in
hosts, ipnodes, or both files depends on how these files are configured to resolve local host
names. Also, check that the config/hosts property of the svc:/network/name-service/
switch service lists files before nis in the lookup order.
An alternative solution to this deadlock problem is to list the LDAP server address, not its
host name, in the ypserv file. Because the LDAP server address would be listed in another
134 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Reverting to NIS
place, changing the address of either the LDAP server or the N2L server would require
slightly more effort.
Reverting to NIS
A site that has transitioned from NIS to LDAP using the N2L service is expected to gradually
replace all NIS clients with LDAP naming services clients. Support for NIS clients eventually
becomes redundant. However, if required, the N2L service provides two ways to return to NIS,
as explained in the procedures in this section.
Tip - Because traditional NIS ignores the N2L versions of the NIS maps if those maps are
present, you can safely leave the N2L versions of the maps on the server. Keeping the N2L
maps might be useful in case you later decide to re-enable N2L.
3. Disable N2L.
# mv /var/yp/NISLDAPmapping backup-filename
4. Set the NOPUSH environment variable so the new maps are not pushed by ypmake.
# NOPUSH=1
5. Make a new set of NIS maps that are based on the NIS sources.
# cd /var/yp
# make
# rm /var/yp/domain-name/LDAP_*
1. Become an administrator.
For more information, see “Using Your Assigned Administrative Rights” in Securing Users and
Processes in Oracle Solaris 11.4.
# ypserv -r
4. Disable N2L.
# mv /var/yp/NISLDAPmapping backup-filename
# ypmap2src
6. Manually check that the regenerated NIS source files have the correct content
and structure.
# rm /var/yp/domain-name/LDAP_*
136 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
How to Revert to Maps Based on DIT Contents
attribute Each LDAP entry consists of a number of named attributes, each of which has one or more
values.
Also, the N2L service mapping and configuration files each consist of a number of named
attributes. Each attribute has one or more values.
baseDN The DN where part of the DIT is rooted. When this is the baseDN for an NIS domains entries it
is also referred to as a context.
context For the N2L service, a context is something under which a NIS domain is generally mapped.
See also baseDN.
custom map Any map that is not a standard map and therefore requires manual modifications to the
mapping file when transitioning from NIS to LDAP.
directory An LDAP directory is a container for LDAP objects. In UNIX, a container for files and
subdirectories.
directory A local file used to store data associated with directory objects.
cache
directory The DIT is the distributed directory structure for a given network. By default, clients access
information the information assuming that the DIT has a given structure. For each domain supported by the
tree (DIT) LDAP server, there is an assumed subtree with an assumed structure.
entry A single row of data in a database table, such as an LDAP element in a DIT.
LDAP Lightweight Directory Access Protocol is a standard, extensible directory access protocol used
by LDAP naming service clients and servers to communicate with each other.
mapping file The NISLDAPmapping file that establishes how to map entries between NIS and LDAP files.
searchTriple A description of where to look for a given attribute in the DIT. The searchTriple is composed of
a base dn, scope, and filter. This is part of the LDAP URL format as defined in RFC 2255.
Glossary 139
140 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Index
141
Index
142 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020
Index
N OpenLDAP server
N2L, 114 pam_ldap, 23, 25
N2L service Oracle Unified Directory See OUD
custom map examples, 124 OUD, 11, 45
setting up, 119 pam_ldap, 23, 24
supported mappings, 117
when not to use, 115
N2L transition See NIS to LDAP transition
network information service schema, 91 P
network model, 33 PAM modules
NIS to LDAP authentication methods, 22
SMF and, 114 LDAP, 22
NIS to LDAP transition, 113, 113 PAM service, 15
See also N2L pam_ldap
buffer overruns, 128 account management in LDAP, 24
commands, 116 pam_ldap service
configuration files, 116 LDAP authentication and, 22
deadlock, 134 pam_unix_* modules
debugging the NISLDAPmapping file, 131 account management in LDAP, 29
hosts database, 118 passwd-cmd service
issues, 131 LDAP authentication and, 22
LDAP error codes, 129 password entry
name service switch configuration, 118 enableShadowUpdate switch, 19
prerequisites, 118 password management See account management
restrictions, 129 passwords
reverting to NIS, 135 LDAP, and, 27
server timeouts, 127 per-user credentials, 18
troubleshooting, 129 Pluggable Authentication Methods See PAM modules
using ldapservercfg command, 118 pluggable authentication module See PAM service
using virtual list views (VLVs), 126 preferredServerList attribute, 32
with OUD, 126 profileName attribute, 31
NIS-to-LDAP, 114 profiles
nisDomain attribute, 85 LDAP client, 73
NISLDAPmapping file, 114, 117 profileTTL attribute, 33
none authentication method project schema
LDAP and, 20 attributes, 100
object class, 101
proxy anonymous credentials, 18
O proxy authentication, 15
objectclassMap attribute, 33, 39 proxy credentials, 17
OLC, 54, 55 proxyDN attribute
Online Configuration, 52 described, 73
Online Configuration (OLC), 52 proxyPassword attribute
143
Index
S
sasl authentication methods
V
LDAP and, 21 /var/yp/NISLDAPmapping file, 117
schemas See LDAP schemas /var/yp/ypserv file
mapping, 37 N2L transition and, 117
RFC 2307bis, 91
search descriptors, 12
searchTimeLimit attribute, 33 Y
searchTriple ypmap2src command, 115, 116
definition, 139 ypserv file
service search descriptors, 37 N2L transition and, 117
serviceAuthenticationMethod attribute, 22, 32
pam_ldap module, 23
passwd-cmd service and, 27
serviceSearchDescriptor attribute, 32
simple authentication method
LDAP and, 20
slapd Standalone LDAP daemon, 45
slapd-config, 52
SMF
and LDAP, 72
NIS-to-LDAP tools and, 114
SSDs, 37
SSL protocol, 16
T
tls authentication methods
144 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP • November 2020