Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ././../../../../../../usr/man/man8/ldapclient.8
Real path: /usr/share/man/man8/ldapclient.8
Zurück
'\" te .\" Copyright (c) 2009, 2022, Oracle and/or its affiliates. .TH ldapclient 8 "9 Mar 2022" "Oracle Solaris 11.4" "System Administration Commands" .SH NAME ldapclient \- initialize LDAP client machine or output an LDAP client profile in LDIF format .SH SYNOPSIS .LP .nf \fB/usr/sbin/ldapclient\fR [\fB-v\fR | \fB-q\fR] init [\fB-a\fR profileName=\fIprofileName\fR] [\fB-a\fR domainName=\fIdomain\fR] [\fB-a\fR proxyDN=\fIproxyDN\fR] [\fB-a\fR proxyPassword=\fIpassword\fR] [\fB-a\fR authenticationMethod=\fIauthenticationMethod\fR] [\fB-a\fR enableShadowUpdate=true | false] [\fB-a\fR adminDN=\fIadminDN\fR] [\fB-a\fR adminPassword=\fIadminPassword\fR] [\fB-a\fR certificatePath=\fIpath\fR] [\fB-d\fR \fIbindDN\fR] [\fB-w\fR \fIbindPassword\fR] [\fB-j\fR \fIpasswdFile\fR] [\fB-y\fR \fIpasswdFile\fR] [\fB-z\fR \fIadminPasswdFile\fR] \fILDAP_server\fR[:\fIport_number\fR] .fi .LP .nf \fB/usr/sbin/ldapclient\fR [\fB-v\fR | \fB-q\fR] manual [\fB-a\fR attrName=\fIattrVal\fR] .fi .LP .nf \fB/usr/sbin/ldapclient\fR [\fB-v\fR | \fB-q\fR] mod [\fB-a\fR attrName=\fIattrVal\fR] .fi .LP .nf \fB/usr/sbin/ldapclient\fR [\fB-v\fR | \fB-q\fR] list .fi .LP .nf \fB/usr/sbin/ldapclient\fR [\fB-v\fR | \fB-q\fR] uninit .fi .LP .nf \fB/usr/sbin/ldapclient\fR [\fB-v\fR | \fB-q\fR] genprofile \fB-a\fR profileName=\fIprofileName\fR [\fB-a\fR attrName=\fIattrVal\fR] .fi .SH DESCRIPTION .sp .LP The \fBldapclient\fR utility can be used to: .RS +4 .TP .ie t \(bu .el o initialize LDAP client machines .RE .RS +4 .TP .ie t \(bu .el o restore the network service environment on LDAP clients .RE .RS +4 .TP .ie t \(bu .el o list the contents of the LDAP client cache in human readable format. .RE .sp .LP The \fBinit\fR form of the \fBldapclient\fR utility initializes an LDAP client machine by using a profile that is stored on the specified LDAP server (\fBLDAP_server\fR). The LDAP client uses the attributes in the specified profile to determine the configuration of the LDAP client. Using a configuration profile enables you to easily install the LDAP client and propagate the configuration changes to LDAP clients. The \fBldap_cachemgr\fR daemon updates the LDAP client configuration when its cache expires by reading the profile. For more information about the configuration profile, see IETF's \fIA Configuration Schema for LDAP Based Directory User Agents\fR. .sp .LP The \fBmanual\fR form of the \fBldapclient\fR utility is used to initialize an LDAP client machine manually. The LDAP client will use the attributes specified on the command line. Any unspecified attributes will be assigned their default values. At least one server must be specified in the \fBdefaultServerList\fR or the \fBpreferredServerList\fR attributes. The \fBdomainName\fR attribute must be specified if the client's \fBdomainName\fR is not set. .sp .LP The \fBmod\fR form of the \fBldapclient\fR utility is used to modify the configuration of an LDAP client machine that was setup manually. This option modifies only those LDAP client configuration attributes specified on the command line. The \fBmod\fR option should only be used on LDAP clients that were initialized using the \fBmanual\fR option. .sp .LP Regardless of which method is used for initialization, if a client is to be configured to use a proxy \fBcredentialLevel\fR, proxy credentials must be provided using \fB-a\fR \fBproxyDN=\fIproxyDN\fR\fR and \fB-a\fR \fBproxyPassword=\fIproxyPassword\fR\fR options. However, if \fB-a\fR \fBproxyPassword=\fIproxyPassword\fR\fR is not specified, \fBldapclient\fR will prompt for it. Note that \fINULL\fR passwords are not allowed in LDAP. If a self \fBcredentialLevel\fR is configured, \fBauthenticationMethod\fR must be \fBsasl/GSSAPI\fR. .sp .LP Similarly, if a client is to be configured to enable shadow information update and use a proxy credentialLevel, administrator credentials must be provided using \fB-a\fR \fBadminDN=\fR\fIadminDN\fR and \fB-a\fR \fBadminPassword=\fR\fIadminPassword\fR. However, the shadow information update does not need the administrator credentials if a self \fBcredentialLevel\fR is configured. .sp .LP The naming service-specific configuration properties are stored in the \fBsvc:/network/ldap/client\fR SMF service. Modifying the SMF properties directly is not advised. Use this tool instead. .sp .LP Other configuration might be modified during installation. It will be backed up to \fB/var/ldap/restore\fR. The files that are typically modified during initialization are: .RS +4 .TP .ie t \(bu .el o \fB/etc/nsswitch.conf\fR .RE .RS +4 .TP .ie t \(bu .el o \fB/etc/defaultdomain\fR (if it exists) .RE .RS +4 .TP .ie t \(bu .el o \fB/var/yp/binding/`domainname`\fR (for a NIS [YP] client) .RE .sp .LP \fBldapclient\fR does not set up a client to resolve hostnames using DNS. It simply copies \fB/etc/nsswitch.ldap\fR to \fB/etc/nsswitch.conf\fR. If you prefer to use DNS for host resolution, please refer to the DNS documentation for information on setting up DNS. See \fBresolv.conf\fR(5). If you want to use \fBsasl/GSSAPI\fR as the authentication method, you have to use DNS for \fBhosts\fR and \fBipnodes\fR resolution. .sp .LP The \fBlist\fR form of the \fBldapclient\fR utility is used to list the LDAP client configuration. The output will be human readable. LDAP configuration files are not guaranteed to be human readable. Note that for security reason, the values for \fBadminDN\fR and \fBadminPassword\fR will not be displayed. .sp .LP The \fBuninit\fR form of the \fBldapclient\fR utility is used to uninitialize the network service environment, restoring it to the state it was in prior to the last execution of \fBldapclient\fR using \fBinit\fR or \fBmanual\fR. The restoration will succeed only if the machine was initialized with the \fBinit\fR or \fBmanual\fR form of \fBldapclient\fR, as it uses the backup files created by these options. .sp .LP The \fBgenprofile\fR option is used to write an LDIF formatted configuration profile based on the attributes specified on the command line to standard output. This profile can then be loaded into an LDAP server to be used as the client profile, which can be downloaded by means of the \fBldapclient init\fR command. Loading the LDIF formatted profile to the directory server can be done through \fBldapadd\fR, or through any server specific import tool. Note that the attributes \fBproxyDN\fR, \fBproxyPassword\fR, \fBcertificatePath\fR, \fBdomainName\fR, \fBenableShadowUpdate\fR, \fBadminDN\fR, and \fBadminPassword\fR are not part of the configuration profile and thus are not permitted. .sp .LP You must have the \fBName Service Management\fR rights profile to run the \fBldapclient\fR command, except with the \fBgenprofile\fR option. .sp .LP To access the information stored in the directory, clients can either authenticate to the directory, or use an unauthenticated connection. The LDAP client is configured to have a credential level of either \fBanonymous\fR or \fBproxy\fR. In the first case, the client does not authenticate to the directory. In the second case, client authenticates to the directory using a proxy identity for read access, and using a administrator identity for write access if \fBenableShadowUpdate\fR is configured. In the third case, client authenticates to the directory using a Kerberos principal that is mapped to an LDAP identity by the LDAP server. .sp .LP If a client is configured to use an identity, you can configure which authentication method the client will use. The LDAP client supports the following authentication methods: .br .in +2 \fBnone\fR .in -2 .br .in +2 \fBsimple\fR .in -2 .br .in +2 \fBsasl/CRAM-MD5\fR .in -2 .br .in +2 \fBsasl/DIGEST-MD5\fR .in -2 .br .in +2 \fBsasl/GSSAPI\fR .in -2 .br .in +2 \fBtls:simple\fR .in -2 .br .in +2 \fBtls:sasl/CRAM-MD5\fR .in -2 .br .in +2 \fBtls:sasl/DIGEST-MD5\fR .in -2 .sp .LP Note that some directory servers may not support all of these authentication methods. For example, be aware that the bind password will be sent in the clear to the LDAP server. For those authentication methods using TLS (transport layer security), the entire session is encrypted. You will need to install the appropriate PEM certificate files to use TLS. .SS "Commands" .sp .LP The following commands are supported: .sp .ne 2 .mk .na \fB\fBinit\fR\fR .ad .br .sp .6 .RS 4n Initialize client from a profile on a server. .RE .sp .ne 2 .mk .na \fB\fBmanual\fR\fR .ad .br .sp .6 .RS 4n Manually initialize client with the specified attribute values. .RE .sp .ne 2 .mk .na \fB\fBmod\fR\fR .ad .br .sp .6 .RS 4n Modify attribute values in the configuration file after a manual initialization of the client. .RE .sp .ne 2 .mk .na \fB\fBlist\fR\fR .ad .br .sp .6 .RS 4n Write the contents of the LDAP client cache to standard output in human readable form. .RE .sp .ne 2 .mk .na \fB\fBuninit\fR\fR .ad .br .sp .6 .RS 4n Uninitialize an LDAP client, assuming that \fBldapclient\fR was used to initialize the client. .RE .sp .ne 2 .mk .na \fB\fBgenprofile\fR\fR .ad .br .sp .6 .RS 4n Generate a configuration profile in LDIF format that can then be stored in the directory for clients to use, with the \fBinit\fR form of this command. .RE .SS "Attributes" .sp .LP The following attributes are supported: .sp .ne 2 .mk .na \fB\fBadminDN\fR\fR .ad .br .sp .6 .RS 4n Specify the Bind Distinguished Name for the administrator identity that is used for shadow information update. This option is required if the credential level is \fBproxy\fR, and \fBenableShadowUpdate\fR is set to \fBtrue\fR. There is no default value. .RE .sp .ne 2 .mk .na \fB\fBadminPassword\fR\fR .ad .br .sp .6 .RS 4n Specify the administrator password. This option is required if the credential level is \fBproxy\fR, and \fBenableShadowUpdate\fR is set to \fBtrue\fR. There is no default value. .RE .sp .ne 2 .mk .na \fB\fBattributeMap\fR\fR .ad .br .sp .6 .RS 4n Specify a mapping from an attribute defined by a service to an attribute in an alternative schema. This can be used to change the default schema used for a given service. The syntax of \fBattributeMap\fR is defined in the profile IETF draft. This option can be specified multiple times. The default value for all services is \fINULL\fR. In the example, .sp .sp .in +2 .nf attributeMap: passwd:uid=employeeNumber .fi .in -2 .sp the LDAP client would use the LDAP attribute \fBemployeeNumber\fR rather than \fBuid\fR for the \fBpasswd\fR service. This is a multivalued attribute. .RE .sp .ne 2 .mk .na \fB\fBauthenticationMethod\fR\fR .ad .br .sp .6 .RS 4n Specify the default authentication method used by all services unless overridden by the \fBserviceAuthenticationMethod\fR attribute. Multiple values can be specified by using a semicolon-separated list. The default value is \fBnone\fR. For those services that use \fBcredentialLevel\fR and \fBcredentialLevel\fR is \fBanonymous\fR, this attribute is ignored. Services such as \fBpam_ldap\fR will use this attribute, even if \fBcredentialLevel\fR is anonymous. The supported authentication methods are described above. If the authenticationMethod is \fBsasl/GSSAPI\fR, the \fBhosts\fR and \fBipnodes\fR of \fB/etc/nsswitch.conf\fR must be configured with DNS support, for example: .sp .in +2 .nf hosts: dns files ipnodes: dns files .fi .in -2 .sp .RE .sp .ne 2 .mk .na \fB\fBbindTimeLimit\fR\fR .ad .br .sp .6 .RS 4n The maximum time in seconds that a client should spend performing a bind operation. Set this to a positive integer. The default value is 30. .RE .sp .ne 2 .mk .na \fB\fBdebugLevel\fR\fR .ad .br .sp .6 .RS 4n Sets the \fBldap_cachemgr\fR(8) debug option level. Set this to a positive integer between 0 and 6. The default value of 0, disables debugging. .RE .sp .ne 2 .mk .na \fB\fBcertificatePath\fR\fR .ad .br .sp .6 .RS 4n The certificate path for the location of the certificate files. The value is the path where PEM format certificate files reside. This is used for TLS support, which is specified in the \fBauthenticationMethod\fR and \fBserviceAuthenticationMethod\fR attributes. The default is \fB/var/ldap\fR. .RE .sp .ne 2 .mk .na \fB\fBcredentialLevel\fR\fR .ad .br .sp .6 .RS 4n Specify the credential level the client should use to contact the directory. The credential levels supported are \fBanonymous\fR, \fBproxy\fR, and \fBself\fR. If a \fBproxy\fR credential level is specified, then the \fBauthenticationMethod\fR attribute must be specified to determine the authentication mechanism. Also, if the credential level is \fBproxy\fR and at least one of the authentication methods require a bind DN, the \fBproxyDN\fR and \fBproxyPassword\fR attribute values must be set. In addition, if \fBenableShadowUpdate\fR is set to \fBtrue\fR, the \fBadminDN\fR and \fBadminPassword\fR values must be set. If a self credential level is specified, the \fBauthenticationMethod\fR must be \fBsasl/GSSAPI\fR. .sp When the \fBcredentialLevel\fR property is set to \fBproxy\fR and the \fBauthenticationMethod\fR property is set to \fBsasl/GSSAPI\fR, all lookups use the host's Kerberos principal. .sp When the \fBcredentialLevel\fR property is set to \fBself\fR, the \fBauthenticationMethod\fR property is set to \fBsasl/GSSAPI\fR, and \fBnscd\fR is in per-user mode, a separate \fBnscd\fR process runs for each user who performs all the user's lookups. These lookups all use the user's Kerberos principal. See the \fBenable_per_user_lookup\fR property of \fBnscd.conf\fR(5). .sp Note that in self mode, users with a UID of 0 use the host principal. All other users must define and initialize their respective Kerberos principal. Defining and initializing the Kerberos principal applies to every user that is defined in any of the configured naming repositories, including \fB/etc/passwd\fR, if those users perform naming lookups. .RE .sp .ne 2 .mk .na \fB\fBdefaultSearchBase\fR\fR .ad .br .sp .6 .RS 4n Specify the default search base DN. There is no default. The \fBserviceSearchDescriptor\fR attribute can be used to override the \fBdefaultSearchBase\fR for given services. .RE .sp .ne 2 .mk .na \fB\fBdefaultSearchScope=one | sub\fR\fR .ad .br .sp .6 .RS 4n Specify the default search scope for the client's search operations. This default can be overridden for a given service by specifying a \fBserviceSearchDescriptor\fR. The default is one level search. .RE .sp .ne 2 .mk .na \fB\fBdefaultServerList\fR\fR .ad .br .sp .6 .RS 4n A space separated list of server names or server addresses, either IPv4 or IPv6. If you specify server names, be sure that the LDAP client can resolve the name without the LDAP name service. You must resolve the LDAP servers' names by using either \fBfiles\fR or \fBdns\fR. If the LDAP server name cannot be resolved, your naming service will fail. .sp The port number is optional. If not specified, the default LDAP server port number 389 is used, except when TLS is specified in the authentication method. In this case, the default LDAP server port number is 636. .sp The format to specify the port number for an IPv6 address is: .sp .sp .in +2 .nf [ipv6_addr]:port .fi .in -2 .sp To specify the port number for an IPv4 address, use the following format: .sp .sp .in +2 .nf ipv4_addr:port .fi .in -2 .sp If the host name is specified, use the format: .sp .sp .in +2 .nf host_name:port .fi .in -2 .sp If you use TLS, the LDAP server's hostname must match the hostname in the TLS certificate. Typically, the hostname in the TLS certificate is a fully qualified domain name. With TLS, the LDAP server host addresses must resolve to the hostnames in the TLS certificate. You must use \fBfiles\fR or \fBdns\fR to resolve the host address. .RE .sp .ne 2 .mk .na \fB\fBdomainName\fR\fR .ad .br .sp .6 .RS 4n Specify the DNS domain name. This becomes the default domain for the machine. The default is the current domain name. This attribute is only used in client initialization. .RE .sp .ne 2 .mk .na \fB\fBenableShadowUpdate=true | false\fR\fR .ad .br .sp .6 .RS 4n Specify whether the client is allowed to update shadow information. If set to \fBtrue\fR and the credential level is \fBproxy\fR, \fBadminDN\fR and \fBadminPassword\fR must be specified. .RE .sp .ne 2 .mk .na \fB\fBfollowReferrals=true | false\fR\fR .ad .br .sp .6 .RS 4n Specify the referral setting. A setting of true implies that referrals will be automatically followed and false would result in referrals not being followed. The default is true. .RE .sp .ne 2 .mk .na \fB\fBobjectclassMap\fR\fR .ad .br .sp .6 .RS 4n Specify a mapping from an \fBobjectclass\fR defined by a service to an \fBobjectclass\fR in an alternative schema. This can be used to change the default schema used for a given service. The syntax of \fBobjectclassMap\fR is defined in the profile IETF draft. This option can be specified multiple times. The default value for all services is \fINULL\fR. In the example, .sp .sp .in +2 .nf objectclassMap=passwd:posixAccount=unixAccount .fi .in -2 .sp the LDAP client would use the LDAP \fBobjectclass\fR of \fBunixAccount\fR rather than the \fBposixAccount\fR for the \fBpasswd\fR service. This is a multivalued attribute. .RE .sp .ne 2 .mk .na \fB\fBpreferredServerList\fR\fR .ad .br .sp .6 .RS 4n Specify the space separated list of server names or server addresses, either IPv4 or IPv6, to be contacted before servers specified by the \fBdefaultServerList\fR attribute. If you specify server names, be sure that the LDAP client can resolve the name without the LDAP name service. You must resolve the LDAP servers' names by using either \fBfiles\fR or \fBdns\fR. If the LDAP server name cannot be resolved, your naming service will fail. .sp The port number is optional. If not specified, the default LDAP server port number 389 is used, except when TLS is specified in the authentication method. In this case, the default LDAP server port number is 636. .sp The format to specify the port number for an IPv6 address is: .sp .sp .in +2 .nf [ipv6_addr]:port .fi .in -2 .sp To specify the port number for an IPv4 address, use the following format: .sp .sp .in +2 .nf ipv4_addr:port .fi .in -2 .sp If the host name is specified, use the format: .sp .sp .in +2 .nf host_name:port .fi .in -2 .sp If you use TLS, the LDAP server's hostname must match the hostname in the TLS certificate. Typically, the hostname in the TLS certificate is a fully qualified domain name. With TLS, the LDAP server host addresses must resolve to the hostnames in the TLS certificate. You must use \fBfiles\fR or \fBdns\fR to resolve the host address. .RE .sp .ne 2 .mk .na \fB\fBprofileName\fR\fR .ad .br .sp .6 .RS 4n Specify the profile name. For \fBldapclient init\fR, this attribute is the name of an existing profile which may be downloaded periodically depending on the value of the \fBprofileTTL\fR attribute. For \fBldapclient genprofile\fR, this is the name of the profile to be generated. The default value is \fBdefault\fR. .RE .sp .ne 2 .mk .na \fB\fBprofileTTL\fR\fR .ad .br .sp .6 .RS 4n Specify the TTL value in seconds for the client information. This is only relevant if the machine was initialized with a client profile. If you do not want \fBldap_cachemgr\fR to attempt to refresh the LDAP client configuration from the LDAP server, set \fBprofileTTL\fR to 0 (zero). Valid values are either zero 0 (for no expiration) or a positive integer in seconds. The default value is 12 hours. .RE .sp .ne 2 .mk .na \fB\fBproxyDN\fR\fR .ad .br .sp .6 .RS 4n Specify the Bind Distinguished Name for the proxy identity. This option is required if the credential level is \fBproxy\fR, and at least one of the authentication methods requires a bind DN. There is no default value. .RE .sp .ne 2 .mk .na \fB\fBproxyPassword\fR\fR .ad .br .sp .6 .RS 4n Specify client proxy password. This option is required if the credential level is \fBproxy\fR, and at least one of the authentication methods requires a bind DN. There is no default. .RE .sp .ne 2 .mk .na \fB\fBsearchTimeLimit\fR\fR .ad .br .sp .6 .RS 4n Specify maximum number of seconds allowed for an LDAP search operation. The default is 30 seconds. The server may have its own search time limit. .RE .sp .ne 2 .mk .na \fB\fBserviceAuthenticationMethod\fR\fR .ad .br .sp .6 .RS 4n Specify authentication methods to be used by a service in the form \fIservicename\fR:\fBauthenticationmethod\fR, for example: .sp .sp .in +2 .nf pam_ldap:tls:simple .fi .in -2 .sp For multiple authentication methods, use a semicolon-separated list. The default value is no service authentication methods, in which case, each service would default to the \fBauthenticationMethod\fR value. The supported authentications are described above. .sp Three services support this feature: \fBpasswd-cmd\fR, \fBkeyserv\fR, and \fBpam_ldap\fR. The \fBpasswd-cmd\fR service is used to define the authentication method to be used by \fBpasswd\fR(1) to change the user's password and other attributes. The \fBkeyserv\fR service is used to identify the authentication method to be used by the \fBchkey\fR(1) and \fBnewkey\fR(8) utilities. The \fBpam_ldap\fR service defines the authentication method to be used for authenticating users when \fBpam_ldap\fR(7) is configured. If this attribute is not set for any of these services, the \fBauthenticationMethod\fR attribute is used to define the authentication method. This is a multivalued attribute. .RE .sp .ne 2 .mk .na \fB\fBserviceCredentialLevel\fR\fR .ad .br .sp .6 .RS 4n Specify credential level to be used by a service. Multiple values can be specified in a space-separated list. The default value for all services is \fINULL\fR. The supported credential levels are: \fBanonymous\fR or \fBproxy\fR. At present, no service uses this attribute. This is a multivalued attribute. .RE .sp .ne 2 .mk .na \fB\fBserviceSearchDescriptor\fR\fR .ad .br .sp .6 .RS 4n Override the default base DN for LDAP searches for a given service. The format of the descriptors also allow overriding the default search scope and search filter for each service. The syntax of \fBserviceSearchDescriptor\fR is defined in the profile IETF draft. The default value for all services is \fINULL\fR. This is a multivalued attribute. In the example, .sp .sp .in +2 .nf serviceSearchDescriptor=passwd:ou=people,dc=a1,dc=example,dc=com?one .fi .in -2 .sp the LDAP client would do a one level search in \fBou=people,dc=a1,dc=example,dc=com\fR rather than \fBou=people,\fIdefaultSearchBase\fR\fR for the \fBpasswd\fR service. .RE .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-a\fR \fBattrName=\fR\fIattrValue\fR\fR .ad .br .sp .6 .RS 4n Specify \fBattrName\fR and its value. See \fBSYNOPSIS\fR for a complete list of possible attribute names and values. .RE .sp .ne 2 .mk .na \fB\fB-D\fR \fIbindDN\fR\fR .ad .br .sp .6 .RS 4n Specifies an entry that has read permission for the requested database. .RE .sp .ne 2 .mk .na \fB\fB-j\fR \fIpasswdFile\fR\fR .ad .br .sp .6 .RS 4n Specify a file containing the password for the bind DN or the password for the SSL client's key database. To protect the password, use this option in scripts and place the password in a secure file. This option is mutually exclusive of the \fB-w\fR option. .RE .sp .ne 2 .mk .na \fB\fB-q\fR\fR .ad .br .sp .6 .RS 4n Quiet mode. No output is generated. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .br .sp .6 .RS 4n Verbose output. Specifying additional \fB-v\fR options displays more detailed information. .RE .sp .ne 2 .mk .na \fB\fB-w\fR \fIbindPassword\fR\fR .ad .br .sp .6 .RS 4n Password to be used for authenticating the bind DN. If this parameter is missing, the command will prompt for a password. \fBNULL\fR passwords are not supported in LDAP. .sp When you use \fB-w\fR \fIbindPassword\fR to specify the password to be used for authentication, the password is visible to other users of the system by means of the \fBps\fR command, in script files, or in shell history. .sp If you supply "\fB-\fR" (hyphen) as a password, the command will prompt for a password. .RE .sp .ne 2 .mk .na \fB\fB-y\fR \fIpasswdFile\fR\fR .ad .br .sp .6 .RS 4n Specify a file containing the password for the proxy DN. To protect the password, use this option in scripts and place the password in a secure file. This option is mutually exclusive of the \fB-a\fR \fIproxyPassword\fR option. .RE .sp .ne 2 .mk .na \fB\fB-z\fR \fIadminPasswdFile\fR\fR .ad .br .sp .6 .RS 4n Specify a file containing the password for the \fBadminDN\fR. To protect the password, use this option in scripts and place the password in a secure file. This option is mutually exclusive of the \fB-a\fR \fIadminPassword\fR option. .RE .SH OPERANDS .sp .LP The following operand is supported: .sp .ne 2 .mk .na \fB\fILDAP_server\fR\fR .ad .br .sp .6 .RS 4n An address or a name for the LDAP server from which the profile will be loaded. The current naming service specified in the \fBnsswitch.conf\fR file is used. Once the profile is loaded, the \fBpreferredServerList\fR and \fBdefaultServerList\fR specified in the profile are used. .RE .SH EXAMPLES .LP \fBExample 1\fR Setting Up a Client By Using the Default Profile Stored on a Specified LDAP Server .sp .LP The following example shows how to set up a client using the default profile stored on the specified LDAP server. This command will only be successful if either the credential level in the profile is set to \fBanonymous\fR or the authentication method is set to \fBnone\fR. .sp .in +2 .nf example# \fBldapclient init 172.16.100.1\fR .fi .in -2 .sp .LP \fBExample 2\fR Setting Up a Client By Using the \fBsimple\fR Profile Stored on a Specified LDAP Server .sp .LP The following example shows how to set up a client using the \fBsimple\fR profile stored on the specified LDAP server. The domainname is set to \fBxyz.example.com\fR and the proxyPassword is \fBsecret\fR. .sp .in +2 .nf example# \fBldapclient init -a profileName=simple \e -a domainName=xyz.example.com \e -a proxyDN=cn=proxyagent,ou=profile,dc=xyz,dc=example,dc=com \e -a proxyPassword=secret '['fe80::a00:20ff:fea3:388']':386\fR .fi .in -2 .sp .LP \fBExample 3\fR Setting Up a Client Using Only One Server .sp .LP The following example shows how to set up a client using only one server. The authentication method is set to \fBnone\fR, and the search base is \fBdc=example,dc=com\fR. .sp .in +2 .nf example# \fBldapclient manual -a authenticationMethod=none \e -a defaultSearchBase=dc=example,dc=com \e -a defaultServerList=172.16.100.1\fR .fi .in -2 .sp .LP \fBExample 4\fR Setting Up a Client Using Only One Server That Does Not Follow Referrals .sp .LP The following example shows how to set up a client using only one server. The credential level is set to \fBproxy\fR. The authentication method of is \fBsasl/CRAM-MD5\fR, with the option not to follow referrals. The domain name is \fBxyz.example.com\fR, and the LDAP server is running on port number 386 at IP address \fB172.16.100.1\fR. .sp .in +2 .nf example# \fBldapclient manual \e -a credentialLevel=proxy \e -a authenticationMethod=sasl/CRAM-MD5 \e -a proxyPassword=secret \e -a proxyDN=cn=proxyagent,ou=profile,dc=xyz,dc=example,dc=com \e -a defaultSearchBase=dc=xyz,dc=example,dc=com \e -a domainName=xyz.example.com \e -a followReferrals=false \e -a defaultServerList=172.16.100.1:386\fR .fi .in -2 .sp .LP \fBExample 5\fR Using \fBgenprofile\fR to Set Only the \fBdefaultSearchBase\fR and the Server Addresses .sp .LP The following example shows how to use the \fBgenprofile\fR command to set the \fBdefaultSearchBase\fR and the server addresses. .sp .in +2 .nf example# \fBldapclient genprofile -a profileName=myprofile \e -a defaultSearchBase=dc=eng,dc=example,dc=com \e -a "defaultServerList=172.16.100.1 172.16.234.15:386" \e > myprofile.ldif\fR .fi .in -2 .sp .LP \fBExample 6\fR Creating a Profile on IPv6 servers .sp .LP The following example creates a profile on IPv6 servers .sp .in +2 .nf example# \fBldapclient genprofile -a profileName=eng \e -a credentialLevel=proxy \e -a authenticationMethod=sasl/DIGEST-MD5 \e -a defaultSearchBase=dc=eng,dc=example,dc=com \e -a "serviceSearchDescriptor=passwd:ou=people,dc=a1,dc=example,dc=com?one"\e -a preferredServerList= '['fe80::a00:20ff:fea3:388']' \e -a "defaultServerList='['fec0::111:a00:20ff:fea3:edcf']' \e '['fec0::111:a00:20ff:feb5:e41']'" > eng.ldif\fR .fi .in -2 .sp .LP \fBExample 7\fR Creating a Profile That Overrides Every Default Value .sp .LP The following example shows a profile that overrides every default value. .sp .in +2 .nf example# \fBldapclient genprofile -a profileName=eng \e -a credentialLevel=proxy -a authenticationMethod=sasl/DIGEST-MD5 \e -a bindTimeLimit=20 \e -a defaultSearchBase=dc=eng,dc=example,dc=com \e -a "serviceSearchDescriptor=passwd:ou=people,dc=a1,dc=example,dc=com?one"\e -a serviceAuthenticationMethod=pam_ldap:tls:simple \e -a defaultSearchScope=sub \e -a attributeMap=passwd:uid=employeeNumber \e -a objectclassMap=passwd:posixAccount=unixAccount \e -a followReferrals=false -a profileTTL=6000 \e -a preferredServerList=172.16.100.30 -a searchTimeLimit=30 \e -a "defaultServerList=172.16.200.1 172.16.100.1 192.168.5.6" \e > eng.ldif\fR .fi .in -2 .sp .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB0\fR .ad .RS 5n .rt The command successfully executed. .RE .sp .ne 2 .mk .na \fB1\fR .ad .RS 5n .rt An error occurred. An error message is output. .RE .sp .ne 2 .mk .na \fB2\fR .ad .RS 5n .rt \fBproxyDN\fR and \fBproxyPassword\fR attributes are required, but they are not provided. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/var/ldap/ldap_client_cred\fR\fR .ad .br .na \fB\fB/var/ldap/ldap_client_file\fR\fR .ad .br .sp .6 .RS 4n Contain the LDAP configuration of the client. These files are not to be modified manually. Their content is not guaranteed to be human readable. Use \fBldapclient\fR to update them. .RE .sp .ne 2 .mk .na \fB\fB/etc/defaultdomain\fR\fR .ad .br .sp .6 .RS 4n System default domain name, matching the domain name of the data in the LDAP servers. See \fBdefaultdomain\fR(5). .RE .sp .ne 2 .mk .na \fB\fB/etc/nsswitch.conf\fR\fR .ad .br .sp .6 .RS 4n Configuration file for the name-service switch. See \fBnsswitch.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB/etc/nsswitch.ldap\fR\fR .ad .br .sp .6 .RS 4n Sample configuration file for the name-service switch configured with LDAP and files. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/network/ldap _ Interface Stability Committed .TE .sp .SH SEE ALSO .sp .LP \fBchkey\fR(1), \fBldaplist\fR(1), \fBdefaultdomain\fR(5), \fBnscd.conf\fR(5), \fBnsswitch.conf\fR(5), \fBresolv.conf\fR(5), \fBattributes\fR(7), \fBkerberos\fR(7), \fBldap\fR(7), \fBidsconfig\fR(8), \fBldap_cachemgr\fR(8), \fBldapaddent\fR(8), \fBnscd\fR(8) .SH CAUTION .sp .LP The \fBCRAM-MD5\fR and \fBDIGEST-MD5\fR mechanisms are considered weak, obsolete, and insecure. They should not be used without an encrypted TLS connection. .SH NOTES .sp .LP Both StartTLS and raw TLS are supported. A StartTLS request will be used on any connection not specifying port 636. .sp .LP For example: .sp .in +2 .nf defaultServerList= foo:636 bar:1000 baz:389 authenticationMethod= tls:simple .fi .in -2 .sp .sp .LP This will attempt a raw TLS open on port 636, followed by an insecure connection on port 1000 with a StartTLS request to secure the connection, finally followed by a similar insecure connection and follow-up StartTLS request on port 389. .sp .LP This is somewhat different than the behavior observed on older Solaris systems. On older systems, in all three cases the system would attempt a raw TLS connection on all three hosts, on those specified ports. A single port servicing both secure and not secure connections was not supported. .sp .LP In the following example, there will be a significant timeout delay while attempting the connection to \fBfoo:636\fR: .sp .in +2 .nf defaultServerList= foo:636 foo:389 authenticationMethod= simple .fi .in -2 .sp .sp .LP This is because port 636 is normally the default TLS port and and "simple" authentication will not attempt an SSL or StartTLS connection on that port. A delay will occur while waiting for the connection to \fBfoo:636\fR to fail, followed by a successful retry on \fBfoo:389\fR. .sp .LP The LDAP client's SMF properties are contained in the \fBsvc:/network/ldap/client\fR service. In addition to the SMF properties managed by the \fBldapclient\fR tool, and described above, the following SMF property controls the LDAP client. .sp .ne 2 .mk .na \fBconfig/group_return_members\fR .ad .br .sp .6 .RS 4n Controls what users as part of the user or member list are returned when obtaining a group from an LDAP server. This applies to getting a group specified by name or GID or through enumeration. .sp The possible property values are: .sp .ne 2 .mk .na \fB"\fBnomember\fR"\fR .ad .RS 17n .rt Stops the LDAP client from fetching the LDAP attributes, "\fBmember\fR" and "\fBuniqueMember\fR", and not returning the associated users as part of the user or member list. Values of these attributes are the group members' LDAP Distinguished Name. .RE .sp .ne 2 .mk .na \fB"nomemberuid"\fR .ad .RS 17n .rt Stops the LDAP client from fetching the LDAP attribute, "\fBmemberUid\fR", and not returning the associated users as part of the user or member list. Values of the attribute are the group members' user name. .RE .RE .sp .LP Processing group members which are Distinguished Name values can be expense as each Distinguished Name value can require a further LDAP lookup to find the user name. The Distinguished Name values can also be other LDAP groups which need to be processed to find all the group members. .sp .LP Setting "\fBnomember\fR" changes Solaris to pre Solaris 11 behavior where group user or member list was just by the LDAP "\fBmemberUid\fR" attribute. This control does not affect what groups are returned by \fBgetgrouplist()\fR or \fBgroups\fR. .sp .LP Ensure that the \fBsvc:/system/name-service/cache\fR service is enabled and online for the \fBldap\fR(7) services to function correctly. Note that the \fBnscd\fR service is enabled by default. See the \fBnscd\fR(8) man page. .SH HISTORY .sp .LP The Solaris 8 OS introduced the \fBldapclient\fR command. .sp .LP The Oracle Solaris 10 OS introduced the \fBsvc:/network/ldap/client\fR service. .sp .LP Starting with Oracle Solaris 11.4, \fBnscd\fR daemon must be running for \fBldap\fR(7) services to function correctly.