You are configuring a Linux server and need to prioritize LDAP for user and group lookups but want to fall back to the local /etc/passwd and /etc/group files if the LDAP lookup fails. Which of the following configurations would you implement in /etc/nsswitch.conf to achieve this requirement?
The /etc/nsswitch.conf file determines the order of lookups performed when a certain type of information is requested, with the services listed from left to right in order of preference. The correct configuration is passwd: ldap files and group: ldap files, which first attempts to resolve password and group information using LDAP and then falls back to local files if LDAP is not available. The wrong answers suggest looking up files before LDAP, which would not meet the requirement, or including services not mentioned in the scenario, such as NIS.
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 LDAP stand for and what is its function?
Open an interactive chat with Bash
What is the purpose of the `/etc/nsswitch.conf` file?
Open an interactive chat with Bash
What are `passwd` and `group` in the context of Linux?