Zentyal Forum, Linux Small Business Server
Zentyal Server => Other modules => Topic started by: ketanaagja on April 05, 2017, 02:04:56 pm
-
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
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
-
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.
ldapsearch -x -D "Administrator@domain.tld" -W -b "DC=..." > /tmp/ldap.txt
and grep for objectSid. You might need to reformat the value (https://serverfault.com/questions/851864/get-sid-by-its-objectsid-using-ldapsearch/852338)
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
-
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
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