Tuesday, November 28, 2017

OpenLDAP - Error Importing Users "createtimestamp: no user modification allowed"

OpenLDAP version: 1.2.3

If you trying to import/add a LDAP user from a LDIF file and run into the following error:
# ldapadd -x -D "cn=admin,dc=example,dc=com" -w password -H ldap:// -f user.ldif -v
adding new entry "cn=Tony Example,ou=group,dc=example,dc=com"
ldap_add: Constraint violation (19)
        additional info: createtimestamp: no user modification allowed

The above error is probably due to you have included system internal values in your LDIF file. For example, "structuralObjectClass" is one of them. If you don't want to re-generate the LDIF file, you can manually remove the following entries:

  • structuralObjectClass
  • entryUUID
  • creatorsName
  • createTimestamp
  • entryCSN
  • modifiersName
  • modifyTimestamp
  • Then try again.


Or if you are using phpldapadmin to export a user into LDIF, make sure you don't choose "Include system attributes".


After your manually remove or re-generate the LDIF file, try it again, and it should solve your problem.

No comments: