Welcome to LQ,
Most likely you've edited the file in question by hand, that's why the CRC is changed and slapd is complaining.
To fix it, first you have to install the perl-Archive-Zip package if not already installed:
Code:
yum install perl-Archive-Zip
Make a backup copy of the corrupted file:
Code:
cp "/etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif" /tmp
Delete the first 2 lines of the file:
Quote:
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 XXXXXXXX
|
Use crc32 to calculate the new CRC:
Code:
crc32 "/etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif"
Then re-add the 2 lines replacing the crc32 value with the one calculated in the previous step
Regards