nerdexam
Linux_Foundation

LFCS · Question #659

In order to use the user and group mappings stored in an LDAP directory, which setting in smb.conf is correct?

The correct answer is B. idmap backend = ldap:ldap://ldap.example.com:636. To configure Samba to use an LDAP directory for user and group ID mappings, the idmap backend setting in smb.conf must specify the ldap backend type followed by the LDAP server URI.

Submitted by jakub_pl· Apr 18, 2026Service Configuration

Question

In order to use the user and group mappings stored in an LDAP directory, which setting in smb.conf is correct?

Options

  • Aidmap backend = ldap://ldap.example.com:636
  • Bidmap backend = ldap:ldap://ldap.example.com:636
  • Cidmap backend = ldap server = ldap://ldap.example.com:636
  • Didmap backend = ldap

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    88% (30)
  • C
    3% (1)
  • D
    6% (2)

Why each option

To configure Samba to use an LDAP directory for user and group ID mappings, the `idmap backend` setting in `smb.conf` must specify the `ldap` backend type followed by the LDAP server URI.

Aidmap backend = ldap://ldap.example.com:636

This syntax is missing the `ldap:` prefix for the backend type, which is required before the LDAP URI to correctly identify the idmap module.

Bidmap backend = ldap:ldap://ldap.example.com:636Correct

The correct syntax for configuring the `idmap backend` to use an LDAP server is `idmap backend = ldap:ldap://ldap.example.com:636`. This specifies `ldap` as the backend type and then provides the LDAP URI for the server where the mappings are stored, allowing Samba to retrieve user and group IDs from LDAP.

Cidmap backend = ldap server = ldap://ldap.example.com:636

This syntax includes 'ldap server =', which is not the correct parameter name or format for specifying the LDAP server within the `idmap backend` directive; the URI should directly follow the backend type.

Didmap backend = ldap

While `idmap backend = ldap` correctly sets the backend type, it does not specify the LDAP server address, making it incomplete for connecting to an external LDAP directory to retrieve mappings.

Concept tested: Samba LDAP ID mapping configuration

Source: https://www.samba.org/samba/docs/current/manpages/smb.conf.5.html

Topics

#Samba#LDAP#ID Mapping#Configuration Files

Community Discussion

No community discussion yet for this question.

Full LFCS Practice