now it's okay. i deleted with rm .../ldap/* and i added with slapadd the init.ldif. now i'va the corrects entries! thanks (for the moment, see you soon!)
On 02/15/2012 04:54 PM, anax wrote:
Ciao Stefano
your ldif file cannot be inserted into the DIT via slapadd, use ldapadd ...
your entries in dn: dc=nodomain may have been created when you installed the ldap-server.
you can find out what the naming-context of your DIT is by ldapsearch -h localhost -x -b '' -s base objectclass=* namingContexts
adjust the "-h localhost" parameter.
suomi
On 02/15/2012 04:28 PM, stefano wrote:
Hi.
i'm installing a ldap server on debian squeeze server. my goal is to assign to every users of different groups a username and password. my slapd.conf is:
include /etc/ldap/schema/core.schema include /etc/ldap/schema/cosine.schema include /etc/ldap/schema/nis.schema include /etc/ldap/schema/inetorgperson.schema pidfile /var/run/slapd/slapd.pid argsfile /var/run/slapd/slapd.args loglevel none modulepath /usr/lib/ldap moduleload back_hdb sizelimit 500
backend hdb database hdb suffix "dc=pippo,dc=it" rootdn "cn=admin,dc=pippo,dc=it" rootpw {SSHA}ho2O8N4lyVnAIi6E/7kQrGl9U9iuGLbC directory "/var/lib/ldap" #index: definisce quali informazioni indicizzare per un accesso più veloce ai dati index objectClass eq #lastmod: richiede che il server memorizzi nel db le info relative all'ultima modifca di un oggetto lastmod on #checkpoint: frequenza con cui scarica su disco il registro delle transazioni checkpoint 512 30 #le impostazioni più sofisticate relative ai berkeleyDB si trovano nel file /var/lib/ldap/DB_CONFIG
i created my first ldif file, init.ldif. i added the following information:
dn: dc=pippo,dc=it objectClass: dcObject objectClass: organizationalUnit dc: pippo ou: pippo.it
dn: o=Iuss,dc=pippo,dc=it objectClass: Organization o: Iuss
dn: ou=Amministratori,o=Iuss,dc=pippo,dc=it objectClass: organizationalUnit ou: Amministratori
dn: ou=Professori,o=Iuss,dc=pippo,dc=it objectClass: organizationalUnit ou: Professori
dn: ou=Stud_Iuss,o=Iuss,dc=pippo,dc=it objectClass: organizationalUnit ou: Stud_Iuss
dn: ou=Stud_Medicina,o=Iuss,dc=pippo,dc=it objectClass: organizationalUnit ou: Stud_Medicina
dn: uid=stefano,ou=Amministratori,o=Iuss,dc=pippo,dc=it objectClass: inetOrgPerson uid: nome sn: cognome cn: nome cognome
if i run
slapadd -l init.ldif -b "dc=pippo","dc=it"
i get the following result:
=> hdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key/data pair already exists (-30995) => hdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30995) slapadd: could not add entry dn="dc=pippo,dc=it" (line=1): txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30995) _### 16.07% eta none elapsed none spd 11.8 k/s
then with:
slapcat -b "dc=pippo","dc=it"
i can see this:
dn: dc=nodomain objectClass: top objectClass: dcObject objectClass: organization o: nodomain dc: nodomain structuralObjectClass: organization entryUUID: 805b9568-e687-1030-82d7-a7960b556dcd creatorsName: cn=admin,dc=nodomain createTimestamp: 20120208100040Z entryCSN: 20120208100040.557042Z#000000#000#000000 modifiersName: cn=admin,dc=nodomain modifyTimestamp: 20120208100040Z
dn: cn=admin,dc=nodomain objectClass: simpleSecurityObject objectClass: organizationalRole cn: admin description: LDAP administrator userPassword:: e1NTSEF9ZVJjelJ0cS9UWWFiMDR2N3o5TUlvWHZaaDBESUNPZko= structuralObjectClass: organizationalRole entryUUID: 805c070a-e687-1030-82d8-a7960b556dcd creatorsName: cn=admin,dc=nodomain createTimestamp: 20120208100040Z entryCSN: 20120208100040.559953Z#000000#000#000000 modifiersName: cn=admin,dc=nodomain modifyTimestamp: 20120208100040Z
dn: dc=pippo,dc=it objectClass: dcObject objectClass: organizationalUnit dc: pippo ou: pippo.it structuralObjectClass: organizationalUnit entryUUID: 90734578-e8ca-1030-8109-57345a76d294 creatorsName: createTimestamp: 20120211070546Z entryCSN: 20120211070546.162263Z#000000#000#000000 modifiersName: modifyTimestamp: 20120211070546Z
why do i have the first error? why there are not the others informations about the tree?
thanks
stefano
openldap-technical@openldap.org