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.
Question
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)- A3% (1)
- B88% (30)
- C3% (1)
- D6% (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.
This syntax is missing the `ldap:` prefix for the backend type, which is required before the LDAP URI to correctly identify the idmap module.
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.
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.
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
Community Discussion
No community discussion yet for this question.