[Samba] Help with ldap configuration please

Phil Burrow philburrow at blueyonder.co.uk
Mon Jul 30 00:18:22 GMT 2007


Adam DiCaprio wrote:
 > This is on RHE4, I am getting an invalid DN error. Is there a good 
resource
 > site for this type of configuration issue? There is a lot of info 
that comes
 > up through google but I am having no luck finding anything relevant 
(or that
 > seems relevant to me). Thank you in advance and sorry about the newbie
 > question.
 >
 > ldap_connect_system: succesful connection to the LDAP server
 > smbldap_search_domain_info: Got no domain info entries for domain
 > add_new_domain_info: Adding new domain
 > add_new_domain_info: failed to add domain dn=
 > sambaDomainName=HFC,dc=hfc,dc=com with: Invalid DN syntax
 >     invalid DN
 > smbldap_search_domain_info: Adding domain info for HFC failed with
 > NT_STATUS_UNSUCCESSFUL

Hi Adam,

Do you have a root entry in your LDAP directory for: dc=hfc,dc=com?

If not, you need to add one because Samba wont add it for you. For 
example, this LDIF:

dn:dc=hfc,dc=com
objectClass: dcObject
objectClass: organization
o: hfc
dc: hfc

I would assume that not having this would cause Samba to complain that 
it can't add your domain to the LDAP directory, because you can't add an 
entry below a root that does not exist.

You can't just install OpenLDAP, install Samba, run them both and expect 
it to work. You need to prepare your OpenLDAP setup first! There is a 
script called smbldap-populate which can put a bunch of default entries 
into your LDAP directory. Have a look at:

/usr/share/doc/samba-3.0.X/LDAP/smbldap-tools-0.X/smbldap-populate

(obviously replace the X with your version)

And make sure you read the README and INSTALL and doc/ stuff in that 
directory too. If you don't have the smbldap-tools stuff in your Samba 
directory you can always get the latest version from 
https://gna.org/projects/smbldap-tools/

HTH,

Phil




More information about the samba mailing list