p4 ldaps
Synopsis
Display a list of LDAP configurations or attempt to authenticate a user against active configurations.
Syntax
p4 [g-opts
] ldaps
[-A]
p4 [g-opts
] ldaps -t
username
Description
The p4 ldaps
command includes two syntax variants:
- The first variant allows you to display existing LDAP configurations;
the
-A
option lists active configurations according to the priority set for them with theauth.ldap.order.
configurable.n
- The second variant allows you to attempt to authenticate the specified user against all active configurations. This command tests each configuration whether the authentication succeeds or fails. That is, testing does not stop with the first successful authentication.
Listing configurations
If you do not use the -A
option, p4 ldaps
returns information
about all configurations. If a configuration has not been assigned a
priority using the
auth.ldap.order.
configurable, it is shown to be disabled. Output includes the
configuration name, the host and port of the AD/LDAP server, the bind
method used, and whether the server is enabled.
n
c: \temp>p4 -p 1666 ldaps bashful localhost:389 simple (disabled) dopey localhost:389 sasl (enabled) sneezy localhost:389 search (enabled)
If you use the -A
option, only enabled servers are shown, and they are
listed in the order in which they will be searched. For example:
c: \temp>p4 -p 1666 ldaps -A sneezy localhost:389 search (enabled) dopey localhost:389 sasl (enabled)
The order of the servers shown above are determined by the setting of
the
auth.ldap.order.
configurable; for example:
n
c: \temp>p4 -p 1666 configure show auth.ldap.order.1=sleepy (configure) auth.ldap.order.2=dopey (configure)
Testing active configurations
Using the -t
option allows you to test all active configurations. A
test might fail because a server is unavailable, because the user could
not be found, or because the wrong credentials were submitted.
-
Here is output from a successful authentication:
c:\temp> p4 -p 1666 ldaps -t myUser Enter password: Testing authentication against LDAP configuration sneezy Authentication successful Testing authentication against LDAP configuration dopey. Authentication successful
-
Here is output from a test that failed because the AD/LDAP servers were unavailable:
c:\temp> p4 -p 1666 ldaps -t myUser Enter password: Testing authentication against LDAP configuration sneezy. Failed to initialize TLS: Server Down Testing authentication against LDAP configuration dopey. Failed to initialize TLS: Server Down
-
Here is output when a bad password is given:
c:\temp> p4 -p 1666 ldaps -t myUser Enter password: Testing authentication against LDAP configuration sneezy Authentication as abrown failed. Reason: Invalid Credentials Testing authentication against LDAP configuration dopey Authentication as abrown failed. Reason: Invalid Credentials
Options
|
Display command output according to the priority set with the
If you omit this option, all active configurations are listed in alphabetical order. |
|
Specifies a user name to authenticate against all active LDAP configurations; this option is provided for testing purposes. |
|
See “Global Options”. |
Usage Notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
Examples
|
List all configurations. |
|
Authenticate the user |