LX0-104 · Question #181
Which of the following correctly describes the method to add Samba users to the LDAP directory?
The correct answer is A. First make sure that a posixAccount entry exists in the Directory for the user you want to add, then. To add Samba users to an LDAP directory, you must first ensure that a posixAccount entry for the user already exists in the directory. Samba's LDAP integration relies on existing user entries.
Question
Options
- AFirst make sure that a posixAccount entry exists in the Directory for the user you want to add, then
- BUse the smbpasswd -a command to add the Samba user from the command line. This will add all
- CCreate an LDIF file containing all required information, then use ldapadd to add the information to
- DCreate an LDIF file containing all required information, then use ldapmodd to add the Samba related
How the community answered
(27 responses)- A85% (23)
- B4% (1)
- C4% (1)
- D7% (2)
Why each option
To add Samba users to an LDAP directory, you must first ensure that a posixAccount entry for the user already exists in the directory. Samba's LDAP integration relies on existing user entries.
When integrating Samba with LDAP, Samba typically adds its specific attributes (like sambaSamAccount) to an existing user entry that already has core attributes, such as those defined by posixAccount. This ensures the user is a valid POSIX user before Samba-specific attributes are added.
The smbpasswd -a command is primarily for adding a Samba user to the local smbpasswd file or for setting a password in a backend like LDAP, but it does not create the foundational LDAP user entry itself if it does not exist.
While creating an LDIF file and using ldapadd is a general method for adding entries to LDAP, it does not specifically address the prerequisite of having a posixAccount for Samba integration, which is implied by the question's context.
ldapmodd is not a standard OpenLDAP client utility for adding entries; ldapmodify is used for modifying or adding entries based on an LDIF, but ldapmodd does not exist.
Concept tested: Samba-LDAP user provisioning
Topics
Community Discussion
No community discussion yet for this question.