After integration samba with openldap i got this type of error while trying to restart smb.service :
juil. 20 13:28:41 ldapmaster smbd[9761]: [2020/07/20 13:28:41.008764, 0] ../../source3/passdb/pdb_ldap.c:6680(pdb_ldapsam_init_common)
juil. 20 13:28:41 ldapmaster smbd[9761]: pdb_init_ldapsam: WARNING: Could not get domain info, nor add one to the domain. We cannot work reliably without it.
juil. 20 13:28:41 ldapmaster smbd[9761]: [2020/07/20 13:28:41.009325, 0] ../../source3/passdb/pdb_interface.c:180(make_pdb_method_name)
juil. 20 13:28:41 ldapmaster smbd[9761]: pdb backend ldapsam:ldap://172.16.0.180 did not correctly init (error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO)
juil. 20 13:28:41 ldapmaster slapd[1217]: conn=1084 fd=11 closed (connection lost)
juil. 20 13:28:41 ldapmaster systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
juil. 20 13:28:41 ldapmaster systemd[1]: Failed to start Samba SMB Daemon.
— Subject: L'unité (unit) smb.service a échoué
Ldap – Openldap+samba pdb_init_ldapsam: WARNING: Could not get domain info, nor add one to the domain. We cannot work reliably without it
active-directoryldapopenldapsamba
Best Answer
Your LDAP database is missing the domain info and samba is not able to add it. This probably is related to the samba.schema missing from the LDAP itself. Depending on where you linux distribution store the samba schema definition file, may probably fix it with these commands:
then, you may check if this worked correctly with command
root@hostnane:~# net GETLOCALSID