A systems administrator is configuring a new Linux server to authenticate against a central LDAP directory. Before completing the SSSD configuration, the administrator wants to perform a direct, unauthenticated query to the LDAP server to ensure network connectivity is open and to verify the structure of a known user entry. Which of the following commands would accomplish this task?
The correct command is ldapsearch -x -b "dc=example,dc=com" "(uid=testuser)". The ldapsearch command is the standard tool for querying an LDAP directory. The -x flag specifies simple (unauthenticated) authentication, and the -b flag defines the base distinguished name (DN) for the search. The final argument is the search filter. ldapadd is used to add entries to an LDAP directory, not search it. getent queries the local Name Service Switch (NSS) databases, which might use LDAP as a backend via SSSD, but it does not perform a direct query to the LDAP server itself. sssd is the command to start the System Security Services Daemon, not to query a directory.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the -x flag in the ldapsearch command do?
Open an interactive chat with Bash
What is an LDAP Base Distinguished Name (DN) used for?
Open an interactive chat with Bash
How does `ldapsearch` compare to the `getent` command for accessing LDAP data?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access