"ldap_add: Naming violation (64)" error when configuring OpenLDAP

Posted by user3215 on Ask Ubuntu See other posts from Ask Ubuntu or by user3215
Published on 2011-03-08T23:50:09Z Indexed on 2012/03/26 5:41 UTC
Read the original article Hit count: 516

Filed under:

I am following the Ubuntu server guide to configure OpenLDAP on an Ubuntu 10.04 server, but can not get it to work.

When I try to use sudo ldapadd -x -D cn=admin,dc=don,dc=com -W -f frontend.ldif I'm getting the following error:

Enter LDAP Password: <entered 'secret' as password>
adding new entry "dc=don,dc=com"
ldap_add: Naming violation (64)
      additional info: value of single-valued naming attribute 'dc' conflicts with value present in entry

Again when I try to do the same, I'm getting the following error:

root@avy-desktop:/home/avy# sudo ldapadd -x -D cn=admin,dc=don,dc=com -W -f frontend.ldif
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

Here is the backend.ldif file:

# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb

# Database settings
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=don,dc=com
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=don,dc=com
olcRootPW: secret
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
olcDbConfig: set_lk_max_locks 1500
olcDbConfig: set_lk_max_lockers 1500
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn="cn=admin,dc=don,dc=com" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to * by dn="cn=admin,dc=don,dc=com" write by * read

frontend.ldif file:

# Create top-level object in domain
dn: dc=don,dc=com
objectClass: top
objectClass: dcObject
objectclass: organization
o: Example Organization
dc: Example
description: LDAP Example 

# Admin user.
dn: cn=admin,dc=don,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: secret

dn: ou=people,dc=don,dc=com
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=don,dc=com
objectClass: organizationalUnit
ou: groups

dn: uid=john,ou=people,dc=don,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: john
sn: Doe
givenName: John
cn: John Doe
displayName: John Doe
uidNumber: 1000
gidNumber: 10000
userPassword: password
gecos: John Doe
loginShell: /bin/bash
homeDirectory: /home/john
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 8
shadowMax: 999999
shadowLastChange: 10877
mail: [email protected]
postalCode: 31000
l: Toulouse
o: Example
mobile: +33 (0)6 xx xx xx xx
homePhone: +33 (0)5 xx xx xx xx
title: System Administrator
postalAddress:
initials: JD

dn: cn=example,ou=groups,dc=don,dc=com
objectClass: posixGroup
cn: example
gidNumber: 10000

Can anyone help me?

© Ask Ubuntu or respective owner

Related posts about 10.04

  • An increase to 3 Gig of RAM slows down Ubuntu 10.04 LTS

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have Ubuntu 10.04 running from an external hard drive (installed on an enclosure) connected via USB port. Like a month or so ago, I increased RAM on my pc from 2 Gigs to 3 Gigs. This resulted on extremely long boot times and slow application loads. While I was understanding the nature of my problem… >>> More

  • Default /etc/apt/sources.list?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I need default source list for ubuntu 10.04. Can anybody help me? Here is Mine:--- Ubuntu supported packages deb http://archive.ubuntu.com/ubuntu/ lucid main restricted multiverse universe deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse deb http://archive… >>> More

  • SSH main process ended

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have a running ubuntu server 10.04.1. When I tried to login to the server via ssh, I could not. Instead, I got connection refused error. I tried to ping the machine and I got reply! So, the clear reason is that SSH daemon is stopped. After reboot, I was able to login to my server via ssh. After… >>> More

  • PPA causing 404 error?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I need default source list for ubuntu 10.04. Can anybody help me? Here is Mine:--- Ubuntu supported packages deb http://archive.ubuntu.com/ubuntu/ lucid main restricted multiverse universe deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse deb http://archive… >>> More

  • Postgresql fails to start on Ubuntu 10.04.4 LTS

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I installed postgresql 9.2 from add-apt-repository ppa:pitti/postgresql using apt-get install postgresql-9.2 At the end of the install and every time I try to launch postgresql by using the following command /etc/init.d/postgresql start or service postgresql start I get this error: Error:… >>> More