nerdexam
Linux_Foundation

LFCS · Question #170

Which of the following statements about the ldapsearch command are true? (Select THREE correct answers.)

The correct answer is A. With the -x option, the simple bind authentication method will be used. B. It is possible to configure a specific LDAP server for the search with the -h option. D. The -L option is useful when for viewing details of LDIF files. The ldapsearch command supports simple bind authentication with -x, specifying a server with -h, and displaying results in LDIF format with -L.

Submitted by daniela_cl· Apr 18, 2026User and Group Management

Question

Which of the following statements about the ldapsearch command are true? (Select THREE correct answers.)

Options

  • AWith the -x option, the simple bind authentication method will be used.
  • BIt is possible to configure a specific LDAP server for the search with the -h option.
  • CThe -b option specifies the database where the LDIF file will be included.
  • DThe -L option is useful when for viewing details of LDIF files.
  • EThe -Z option requires a successful StartTLS operation in order to continue.

How the community answered

(55 responses)
  • A
    87% (48)
  • C
    4% (2)
  • E
    9% (5)

Why each option

The `ldapsearch` command supports simple bind authentication with `-x`, specifying a server with `-h`, and displaying results in LDIF format with `-L`.

AWith the -x option, the simple bind authentication method will be used.Correct

The `-x` option for `ldapsearch` explicitly forces the client to use simple bind authentication, which involves transmitting the provided username and password (if any) using a basic mechanism, often without strong encryption unless TLS/SSL is independently negotiated.

BIt is possible to configure a specific LDAP server for the search with the -h option.Correct

The `-h` option allows users to specify the hostname or IP address of the target LDAP server for the search operation, enabling connection to a specific server regardless of default configurations.

CThe -b option specifies the database where the LDIF file will be included.

The `-b` option specifies the *base distinguished name* (Base DN) for the search operation, which defines the starting point within the directory tree, not the database where an LDIF file will be included.

DThe -L option is useful when for viewing details of LDIF files.Correct

The `-L` option instructs `ldapsearch` to display the search results in a standard LDIF (LDAP Data Interchange Format) format, omitting extraneous comments and version information, making the output suitable for parsing or for use with other LDAP utilities like `ldapadd` or `ldapmodify`.

EThe -Z option requires a successful StartTLS operation in order to continue.

The `-Z` option attempts to establish a StartTLS session for encrypted communication. If the StartTLS operation fails (e.g., due to server non-support or certificate issues), `ldapsearch` typically terminates with an error or warning, rather than continuing without a successful StartTLS operation.

Concept tested: ldapsearch command options

Topics

#ldapsearch#LDAP#Directory Services#Authentication

Community Discussion

No community discussion yet for this question.

Full LFCS Practice