#207 objectClass: nsContainer is missing
Opened 2 years ago by victorcostache. Modified 2 years ago

Hello,

I was trying to integrate OpenLDAP with named (BIND 9) on a Gentoo server. I was not able to import the example.ldif into LDAP because the nsContainer object (structure) is unknown (not defined in any schema). What schema should I use for that?

Please advise,
Victor


bind-dyndb-ldap is designed to be used with 389-ds LDAP server as part of FreeIPA solution. The base schema is part of 389-ds and FreeIPA packages. If you want to use it with OpenLDAP, you are on your own to adapt the schema to OpenLDAP format.

If you'd do so, feel free to contribute the schema changes back to bind-dyndb-ldap so that we can include them in the distribution.

@abbra

does this work for you?
This is how we have it, using (i modified to make it generic of course ...)
openldap from symas 2.4.59

dn: ou=dns,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: dns
description: dns container

dn: ou=records,ou=dns,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: records
description: dns device records

dn: ou=ptr4-records,ou=dns,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: ptr4-records
description: dns ip4 reverse records

dn: ou=ptr6-records,ou=dns,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: ptr6-records
description: dns ip6 reverse records

dn: idnsName=example.com.,ou=devs,ou=dns,dc=example,dc=com
objectClass: idnsRecord
objectClass: top
objectClass: idnsZone
dNSTTL: 360
idnsName: example.com.
idnsZoneActive: TRUE
idnsSOAmName: server.example.com
idnsSOArName: root.server.example.com
idnsSOAexpire: 604800
idnsSOAminimum: 3600
idnsSOArefresh: 28800
idnsSOAretry: 7200
NSRecord: example.com.
idnsSOAserial: 1
ARecord: 10.0.1.1

dn: idnsName=server.example.com,idnsName=example.com.,ou=records,ou=dns,dc=example,dc=com
objectClass: idnsRecord
objectClass: top
dNSTTL: 360
idnsName: server.example.com
aAAARecord: fe80::2
aRecord: 10.0.1.2

dn: idnsName=10.in-addr.arpa.,ou=ptr4-records,ou=dns,dc=example,dc=com
objectClass: idnsRecord
objectClass: top
objectClass: idnsZone
dNSTTL: 360
idnsName: 10.in-addr.arpa.
idnsZoneActive: TRUE
idnsSOAmName: server.example.com
idnsSOArName: root.server.example.com
idnsSOAexpire: 604800
idnsSOAminimum: 3600
idnsSOArefresh: 28800
idnsSOAretry: 7200
nSRecord: example.com.
idnsSOAserial: 1

dn: idnsName=2.1.0,idnsName=10.in-addr.arpa.,ou=ptr4-records,ou=dns,dc=example,dc=com
objectClass: idnsRecord
objectClass: top
dNSTTL: 360
pTRRecord: server
idnsName: 2.1.0

dn: idnsName=ip6.arpa.,ou=ptr6,ou=dns,dc=example,dc=com
objectClass: idnsRecord
objectClass: top
objectClass: idnsZone
dNSTTL: 360
idnsName: ip6.arpa.
idnsZoneActive: TRUE
idnsSOAmName: server.example.com
idnsSOArName: root.server.example.com
idnsSOAexpire: 604800
idnsSOAminimum: 3600
idnsSOArefresh: 28800
idnsSOAretry: 7200
nSRecord: example.com.
idnsSOAserial: 1

dn: idnsName=2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f,idnsName=ip6.arpa.,ou=ptr6-records,ou=dns,dc=example,dc=com
objectClass: idnsRecord
objectClass: top
dNSTTL: 360
pTRRecord: server
idnsName: 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f

Bind config would look like so:

dyndb "example.com" "/usr/lib64/bind/ldap.so" {
    uri "ldap://localhost";
    base "ou=records,ou=dns,dc=example,dc=com";
    auth_method "simple";
    bind_dn "cn=admin,dc=example,dc=com";
    password "password";
};
dyndb "10.in-addr.arpa" "/usr/lib64/bind/ldap.so" {
    uri "ldap://localhost";
    base "ou=ptr4-records,ou=dns,dc=example,dc=com";
    auth_method "simple";
    bind_dn "cn=admin,dc=example,dc=com";
    password "password";
};
dyndb "ip6.arpa" "/usr/lib64/bind/ldap.so" {
    uri "ldap://localhost";
    base "ou=ptr6-records,ou=dns,dc=example,dc=com";
    auth_method "simple";
    bind_dn "cn=admin,dc=example,dc=com";
    password "password";
};

Login to comment on this ticket.

Metadata