How to troubleshoot duplicate attributeType issue in ldap schema file during slapd service start/restart ?
Environment
- Red Hat Enterprise Linux 6.1
- Open LDAP 2.4
Issue
- How to troubleshoot duplicate attributeType issue in ldap schema file during slapd service start/restart ?
- Following error is observed after adding new custom schema file "rh-mail.schema" and starting slapd service
[root@ldapserver ~]# /etc/init.d/slapd start
Checking configuration files for slapd: [FAILED]
/etc/openldap/schema/rh-mail.schema: line 54 attributetype: Inconsistent duplicate attributeType: "mailHost"
slaptest: bad configuration file!
Resolution
Here are the steps to identify duplicate atrribute.
- Go to openldap schema directory
# cd /etc/openldap/schema
2. Command to identify schema files which contains duplicate attribute.
# grep -w <attributeName> *.schema
Example:
# grep -w mailHost *.schema
Note: For this issue the entry was available in both misc.schema and rh-mail.schema
3. Identify the objectClass name which will be used to add the "mailHost" attributeType in the database.
Example:
inetMailPerson
4. Identify the schema file which contains the objectClass.
# grep -w <objectClass name> *.schema
Example:
# grep -w inetMailPerson *.schema
5. Remove/comment the duplicate attributeType entry from the schema file which does not have the objectClass defined.
Example:
misc.schema
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments