Help with ldap, samba and smbldap-tools

Hi,

I have a openLDAP server running and now I’m trying to set up a samba PDC. Everything is ok until I try smbldap-populate, it’s giving me these errors:

Populating LDAP directory for domain GALACTICA (S-1-5-21-1358282824-505230644-3632140216)
(using builtin directory structure)

entry dc=galactica,dc=be already exist.
entry ou=Users,dc=galactica,dc=be already exist.
entry ou=Groups,dc=galactica,dc=be already exist.
entry ou=Computers,ou=Users,dc=galactica,dc=be already exist.
entry ou=Users,dc=galactica,dc=be already exist.
entry uid=root,ou=Users,dc=galactica,dc=be already exist.
entry uid=nobody,ou=Users,dc=galactica,dc=be already exist.
adding new entry: cn=Domain Admins,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 101.
adding new entry: cn=Domain Users,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 112.
adding new entry: cn=Domain Guests,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 123.
adding new entry: cn=Domain Computers,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 134.
adding new entry: cn=Administrators,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 179.
adding new entry: cn=Account Operators,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 201.
adding new entry: cn=Print Operators,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 212.
adding new entry: cn=Backup Operators,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 223.
adding new entry: cn=Replicators,ou=Groups,dc=galactica,dc=be
failed to add entry: no structural object class provided at /usr/sbin/smbldap-populate line 498, <GEN1> line 234.
entry sambaDomainName=GALACTICA,dc=galactica,dc=be already exist. Updating it…

This is an example of what I’m trying to import:

dn: cn=Domain Admins,$config{groupsdn}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 512
cn: Domain Admins
memberUid: $adminName
description: Netbios Domain Administrators
sambaSID: $config{SID}-512
sambaGroupType: 2
displayName: Domain Admins

I thought one of these objectClasses was structural, but it seems that they have changed them to auxiliary. Is there an objectClass that I can use so this error will disappear and my ldap gets populated?

This is on openSUSE 11 with all the updates done

Thanks,

Philip

If anyone encounters this problem, you have to replace in your ldap server the rfc2307bis schema with nis schema or add a structural OC to your group entries (recommended one seems to be groupOfNames and the member attribute). Then it smbldap-populate works.

philipraets,

Could you please be more specific about the value assigned to the member attribute. I am a bit confused.

Thanks.

Hi,

The member value must be something like cn=username, ou=organizational unit, dc=domain, dc=tld

For example, I have a user Philip that is a member of the organizational unit administrators of the domain galactica.private:

objectclass: groupofnames
cn: Domain Admins
description: All the domain administrators
member: cn=Philip,ou=administrators,dc=galactica,dc=private

modify file /etc/sysconfig/openldap with parameters openldap with file but you cannot use ldap only the file slapd.conf with vi…

or (I prefere)

rename rfc2307bis.schema and copy nis.schema with the name rf2307bis.schema and use yast for initialise and configure openldap.

After
ldapadmin ok
Lam ok
smbtools-populate ok