Diese Anleitung zeigt, wie du Samba in ein zentrales Verzeichnisdienst-System integrierst – wahlweise über OpenLDAP oder Active Directory (AD). Dadurch entfällt die lokale Benutzerpflege auf dem Linux-Server.
ldapsearch)apt install samba libnss-ldap libpam-ldap nscd
passdb backend = ldapsam:ldap://ldap.mash4077.local ldap admin dn = cn=admin,dc=mash4077,dc=local ldap suffix = dc=mash4077,dc=local ldap user suffix = ou=Users ldap group suffix = ou=Groups ldap machine suffix = ou=Computers ldap ssl = start_tls
dc=mash4077,dc=local ├── ou=Users │ └── uid=lars ├── ou=Groups │ └── cn=smbgroup
workgroup = MASH security = ADS realm = MASH4077.LOCAL idmap config * : backend = tdb idmap config * : range = 3000-7999 idmap config MASH : backend = rid idmap config MASH : range = 10000-999999 winbind use default domain = yes winbind enum users = yes winbind enum groups = yes
net ads join -U Administrator
wbinfo -u # AD-Benutzer anzeigen getent passwd # Benutzerauflösung testen
valid users = MASH\\lars
Oder bei LDAP:
valid users = @smbgroup
Lars Weiß 10.07.2025 12:32