Author Topic: Error on person LDAP entry creation: The client attempted to add an entry that a  (Read 753 times)

ketanaagja

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Getting new error if I try to add new user. However I am adding this user first time on server.

Error on person LDAP entry creation: The client attempted to add an entry that already exists. This can occur as a result of * An add request was submitted with a DN that already exists * A modify DN requested was submitted, where the requested new DN already exists * The request is adding an attribute to the schema and an attribute with the given OID or name already exists .<br/> Operation parameters:{ 'homeDirectory' => '/home/saiyadha', 'dn' => 'CN=Dhara Saiyani,OU=India,DC=ghpl,DC=com', 'gidNumber' => '2513', 'description' => 'Dhara Saiyani', 'quota' => 0, 'cn' => 'Dhara Saiyani', 'userAccountControl' => 514, 'sn' => 'Saiyani', 'objectClass' => [ 'top', 'person', 'organizationalPerson', 'user', 'posixAccount', 'systemQuotas' ], 'displayName' => 'Dhara Saiyani', 'userPrincipalName' => 'saiyadha@GHPL.COM', 'givenName' => 'Dhara', 'name' => 'Dhara Saiyani', 'uidNumber' => 2826, 'sAMAccountName' => 'saiyadha' } at /usr/share/perl5/EBox/Samba/User.pm line 514

Quote
Trace:

Error on person LDAP entry creation: The client attempted to add an entry that already exists. This can occur as
a result of

 * An add request was submitted with a DN that already exists

 * A modify DN requested was submitted, where the requested new DN already exists

 * The request is adding an attribute to the schema and an attribute with the
given OID or name already exists
.<br/> Operation parameters:{
  'homeDirectory' => '/home/saiyadha',
  'dn' => 'CN=Dhara Saiyani,OU=India,DC=ghpl,DC=com',
  'gidNumber' => '2513',
  'description' => 'Dhara Saiyani',
  'quota' => 0,
  'cn' => 'Dhara Saiyani',
  'userAccountControl' => 514,
  'sn' => 'Saiyani',
  'objectClass' => [
                     'top',
                     'person',
                     'organizationalPerson',
                     'user',
                     'posixAccount',
                     'systemQuotas'
                   ],
  'displayName' => 'Dhara Saiyani',
  'userPrincipalName' => 'saiyadha@GHPL.COM',
  'givenName' => 'Dhara',
  'name' => 'Dhara Saiyani',
  'uidNumber' => 2826,
  'sAMAccountName' => 'saiyadha'
}
 at /usr/share/perl5/EBox/Samba/User.pm line 514


eadrs

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +1/-0
    • View Profile
Had the same issue.

To identify the problem I did a manual ldapadd in the shell. This exited with the error

Failed to re-index objectsid ... unique index violation on objectSid

I checked the objectSid with ldapsearch and they were all unique. After more digging I found out that rIDNextRID was set too low. The solution is to find the highest objectSid (export ldap with e.g.

Code: [Select]
ldapsearch -x -D "Administrator@domain.tld" -W -b "DC=..." > /tmp/ldap.txt
and grep for objectSid. You might need to reformat the value
Next set rIDNextRID of OU=Domain Controllers to the highest objectSid + 1

Also see:
https://lists.samba.org/archive/samba/2016-June/200757.html
https://groups.google.com/forum/#!topic/linux.samba/brSRlEPP4u8

Use phpldapadmin for a graphical frontend if needed

GuidoC

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
    • Blog de Guido Cutipa
Getting new error if I try to add new user. However I am adding this user first time on server.

Error on person LDAP entry creation: The client attempted to add an entry that already exists. This can occur as a result of * An add request was submitted with a DN that already exists * A modify DN requested was submitted, where the requested new DN already exists * The request is adding an attribute to the schema and an attribute with the given OID or name already exists .<br/> Operation parameters:{ 'homeDirectory' => '/home/saiyadha', 'dn' => 'CN=Dhara Saiyani,OU=India,DC=ghpl,DC=com', 'gidNumber' => '2513', 'description' => 'Dhara Saiyani', 'quota' => 0, 'cn' => 'Dhara Saiyani', 'userAccountControl' => 514, 'sn' => 'Saiyani', 'objectClass' => [ 'top', 'person', 'organizationalPerson', 'user', 'posixAccount', 'systemQuotas' ], 'displayName' => 'Dhara Saiyani', 'userPrincipalName' => 'saiyadha@GHPL.COM', 'givenName' => 'Dhara', 'name' => 'Dhara Saiyani', 'uidNumber' => 2826, 'sAMAccountName' => 'saiyadha' } at /usr/share/perl5/EBox/Samba/User.pm line 514

Quote
Trace:

Error on person LDAP entry creation: The client attempted to add an entry that already exists. This can occur as
a result of

 * An add request was submitted with a DN that already exists

 * A modify DN requested was submitted, where the requested new DN already exists

 * The request is adding an attribute to the schema and an attribute with the
given OID or name already exists
.<br/> Operation parameters:{
  'homeDirectory' => '/home/saiyadha',
  'dn' => 'CN=Dhara Saiyani,OU=India,DC=ghpl,DC=com',
  'gidNumber' => '2513',
  'description' => 'Dhara Saiyani',
  'quota' => 0,
  'cn' => 'Dhara Saiyani',
  'userAccountControl' => 514,
  'sn' => 'Saiyani',
  'objectClass' => [
                     'top',
                     'person',
                     'organizationalPerson',
                     'user',
                     'posixAccount',
                     'systemQuotas'
                   ],
  'displayName' => 'Dhara Saiyani',
  'userPrincipalName' => 'saiyadha@GHPL.COM',
  'givenName' => 'Dhara',
  'name' => 'Dhara Saiyani',
  'uidNumber' => 2826,
  'sAMAccountName' => 'saiyadha'
}
 at /usr/share/perl5/EBox/Samba/User.pm line 514




I had the same issue.

The solution its simple, I only needed to execute the next commands:


1.- To check if the database have problems:

    # samba-tool dbcheck

2.- Fix issues:

   # samba-tool dbcheck --fix --yes
« Last Edit: September 04, 2018, 08:31:45 pm by GuidoC »