Hello. I added some entries to OpenLdap but I want edit them. How can I do it?
my "slapcat" output is :
# slapcat 55d45334 ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={1}monitor.ldif" 55d45334 ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={2}hdb.ldif" 55d45334 The first database does not allow slapcat; using the first available one (2) 55d45334 hdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2). Expect poor performance for suffix "dc=linux,dc=dj". dn: dc=linux-d,dc=j objectClass: dcObject objectClass: organization dc: linux-d o: linux-d structuralObjectClass: organization entryUUID: 1c4fa7b0-da8c-1034-91a3-f90dc6355c19 creatorsName: cn=Manager,dc=linux-d,dc=j createTimestamp: 20150819070316Z entryCSN: 20150819070316.921292Z#000000#000#000000 modifiersName: cn=Manager,dc=linux-d,dc=j modifyTimestamp: 20150819070316Z
dn: ou=Users,dc=linux-d,dc=j objectClass: organizationalUnit ou: Users structuralObjectClass: organizationalUnit entryUUID: c3dbe28c-da8c-1034-91a4-f90dc6355c19 creatorsName: cn=Manager,dc=linux-d,dc=j createTimestamp: 20150819070758Z entryCSN: 20150819070758.019816Z#000000#000#000000 modifiersName: cn=Manager,dc=linux-d,dc=j modifyTimestamp: 20150819070758Z
I want to change "linux-d" to "linux".
I edited "/tmp/users.ldif" file and used "ldapmodify -a -D cn=Manager,dc=linux,dc=dj -w hack3rcon -f /tmp/users.ldif" but "slapcat" output still is :
slapcat 55d4568e ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={1}monitor.ldif" 55d4568e ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={2}hdb.ldif" 55d4568e The first database does not allow slapcat; using the first available one (2) 55d4568e hdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2). Expect poor performance for suffix "dc=linux,dc=dj". dn: dc=linux-d,dc=j objectClass: dcObject objectClass: organization dc: linux-d o: linux-d structuralObjectClass: organization entryUUID: 1c4fa7b0-da8c-1034-91a3-f90dc6355c19 creatorsName: cn=Manager,dc=linux-d,dc=j createTimestamp: 20150819070316Z entryCSN: 20150819070316.921292Z#000000#000#000000 modifiersName: cn=Manager,dc=linux-d,dc=j modifyTimestamp: 20150819070316Z
dn: ou=Users,dc=linux-d,dc=j objectClass: organizationalUnit ou: Users structuralObjectClass: organizationalUnit entryUUID: c3dbe28c-da8c-1034-91a4-f90dc6355c19 creatorsName: cn=Manager,dc=linux-d,dc=j createTimestamp: 20150819070758Z entryCSN: 20150819070758.019816Z#000000#000#000000 modifiersName: cn=Manager,dc=linux-d,dc=j modifyTimestamp: 20150819070758Z
dn: dc=linux,dc=dj objectClass: dcObject objectClass: organization dc: linux o: linux structuralObjectClass: organization entryUUID: e1968706-daa4-1034-82a7-470596994b9c creatorsName: cn=Manager,dc=linux,dc=dj createTimestamp: 20150819100035Z entryCSN: 20150819100035.818429Z#000000#000#000000 modifiersName: cn=Manager,dc=linux,dc=dj modifyTimestamp: 20150819100035Z
dn: ou=Users,dc=linux,dc=dj objectClass: organizationalUnit ou: Users structuralObjectClass: organizationalUnit entryUUID: 2a1a366c-daa5-1034-82a8-470596994b9c creatorsName: cn=Manager,dc=linux,dc=dj createTimestamp: 20150819100237Z entryCSN: 20150819100237.477397Z#000000#000#000000 modifiersName: cn=Manager,dc=linux,dc=dj modifyTimestamp: 20150819100237Z
As you see, I have "linux-d" .
How can I solve it?
--On Wednesday, August 19, 2015 11:44 AM +0000 Jason Long hack3rcon@yahoo.com wrote:
Hello. I added some entries to OpenLdap but I want edit them. How can I do it?
What you are talking about here is restructuring your entire directory tree. So what you have to do in that case is use a modrdn operation. However, given that "dc=linux-d,dc=j" is likely defined as the root of your DIT for your HDB db, you likely need to use slapcat to update both your cn=config db and your database to match the new root DIT, rather than using a modrdn op.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Can you tell me how?
# slapcat 55d6b4f8 ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={1}monitor.ldif" 55d6b4f8 ldif_read_file: checksum error on "/etc/openldap/slapd.d/cn=config/olcDatabase={2}hdb.ldif" 55d6b4f8 The first database does not allow slapcat; using the first available one (2) 55d6b4f8 hdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2). Expect poor performance for suffix "dc=linux,dc=dj". dn: dc=linux-d,dc=j objectClass: dcObject objectClass: organization dc: linux-d o: linux-d structuralObjectClass: organization entryUUID: 1c4fa7b0-da8c-1034-91a3-f90dc6355c19 creatorsName: cn=Manager,dc=linux-d,dc=j createTimestamp: 20150819070316Z entryCSN: 20150819070316.921292Z#000000#000#000000 modifiersName: cn=Manager,dc=linux-d,dc=j modifyTimestamp: 20150819070316Z
dn: ou=Users,dc=linux-d,dc=j objectClass: organizationalUnit ou: Users structuralObjectClass: organizationalUnit entryUUID: c3dbe28c-da8c-1034-91a4-f90dc6355c19 creatorsName: cn=Manager,dc=linux-d,dc=j createTimestamp: 20150819070758Z entryCSN: 20150819070758.019816Z#000000#000#000000 modifiersName: cn=Manager,dc=linux-d,dc=j modifyTimestamp: 20150819070758Z
I don't like to have any "linux-d".
On Wednesday, August 19, 2015 10:40 PM, Quanah Gibson-Mount quanah@zimbra.com wrote: --On Wednesday, August 19, 2015 11:44 AM +0000 Jason Long
hack3rcon@yahoo.com wrote:
Hello. I added some entries to OpenLdap but I want edit them. How can I do it?
What you are talking about here is restructuring your entire directory tree. So what you have to do in that case is use a modrdn operation. However, given that "dc=linux-d,dc=j" is likely defined as the root of your DIT for your HDB db, you likely need to use slapcat to update both your cn=config db and your database to match the new root DIT, rather than using a modrdn op.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
--On Friday, August 21, 2015 6:20 AM +0000 Jason Long hack3rcon@yahoo.com wrote:
Can you tell me how?
# slapcat
Read the slapcat manual page to learn how to export the config DB.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Is it OK ?
Export your DB with slapcat:
slapcat > ldif
Import the DB with slapadd (make sure the LDAP server is stopped):
slapadd -l ldif
On Friday, August 21, 2015 8:01 PM, Quanah Gibson-Mount quanah@zimbra.com wrote: --On Friday, August 21, 2015 6:20 AM +0000 Jason Long hack3rcon@yahoo.com wrote:
Can you tell me how?
# slapcat
Read the slapcat manual page to learn how to export the config DB.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
--On Saturday, August 22, 2015 5:49 AM +0000 Jason Long hack3rcon@yahoo.com wrote:
Is it OK ?
No. Again, read the manual page. Since you most likely would need to alter the base for your cn=config db, you need to export it as well as the data db.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-technical@openldap.org