Zentyal Forum, Linux Small Business Server

International => Spanish => Topic started by: AFGP on July 18, 2019, 06:37:45 pm

Title: [RESUELTO] FALLA al crear un usuario nuevo
Post by: AFGP on July 18, 2019, 06:37:45 pm
Buen día

Error en la creación del usuario LDAP: 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:{ 'name' => 'MAYERLY ALEJANDRA PEDRAZA GOMEZ', 'objectClass' => [ 'top', 'person', 'organizationalPerson', 'user', 'posixAccount', 'systemQuotas' ], 'givenName' => 'MAYERLY ALEJANDRA', 'sn' => 'PEDRAZA GOMEZ', 'gidNumber' => '2513', 'userAccountControl' => 514, 'homeDirectory' => '/home/ECF7381E', 'userPrincipalName' => 'ECF7381E@LATCOM.CO', 'uidNumber' => 4221, 'displayName' => 'MAYERLY ALEJANDRA PEDRAZA GOMEZ', 'dn' => 'CN=MAYERLY ALEJANDRA PEDRAZA GOMEZ,CN=Users,DC=latcom,DC=co', 'sAMAccountName' => 'ECF7381E', 'quota' => 0, 'cn' => 'MAYERLY ALEJANDRA PEDRAZA GOMEZ' } at /usr/share/perl5/EBox/Samba/User.pm line 514

root@zentyal2:/home/soporte# samba-tool user create ECF2763A Latcom2019+ --given-name="JOSETH ARTT" --surname="CAMACHO CASTAÑEDA" --mail=ECF2763A@mail-latcom.com.co
ERROR(ldb): Failed to add user 'ECF2763A':  - ../ldb_tdb/ldb_index.c:1238: Failed to re-index objectSid in CN=JOSETH ARTT CAMACHO CASTAÑEDA,CN=Users,DC=latcom,DC=co - ../ldb_tdb/ldb_index.c:1158: unique index violation on objectSid in CN=JOSETH ARTT CAMACHO CASTAÑEDA,CN=Users,DC=latcom,DC=co
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/user.py", line 350, in run
    smartcard_required=smartcard_required)
  File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 452, in newuser
    self.add(ldbmessage)

2019/07/18 06:01:27 INFO> NTP.pm:60 EBox::NTP::appArmorProfiles - Setting NTP apparmor profile
2019/07/18 06:01:28 INFO> Service.pm:958 EBox::Module::Service::restartService - Restarting service for module: samba
2019/07/18 06:01:39 INFO> SyncDaemon.pm:307 EBox::Samba::SyncDaemon::run - Samba sync daemon started
2019/07/18 06:03:43 ERROR> LDAP.pm:196 EBox::Module::LDAP::_connectToSchemaMaster - Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at /usr/share/perl5/EBox/Module/LDAP.pm line 196
EBox::Module::LDAP::_connectToSchemaMaster('EBox::Samba=HASH(0x5899bc0)') called at /usr/share/perl5/EBox/Module/LDAP.pm line 275
EBox::Module::LDAP::_loadSchemasFiles('EBox::Samba=HASH(0x5899bc0)', 'ARRAY(0x6f71888)') called at /usr/share/perl5/EBox/Module/LDAP.pm line 267
EBox::Module::LDAP::_loadSchemas('EBox::Samba=HASH(0x5899bc0)') called at /usr/share/perl5/EBox/Module/LDAP.pm line 341
EBox::Module::LDAP::_performSetup('EBox::Samba=HASH(0x5899bc0)') called at /usr/share/perl5/EBox/Samba.pm line 646
EBox::Samba::_regenConfig('EBox::Samba=HASH(0x5899bc0)', 'restart', 1, 'restartModules', 1) called at /usr/share/perl5/EBox/Module/Service.pm line 960
eval {...} at /usr/share/perl5/EBox/Module/Service.pm line 959
EBox::Module::Service::restartService('EBox::Samba=HASH(0x5899bc0)', 'restartModules', 1) called at /usr/share/perl5/EBox/Util/Init.pm line 121
eval {...} at /usr/share/perl5/EBox/Util/Init.pm line 119
EBox::Util::Init::moduleAction('samba', 'restartService', 'start') called at /usr/share/perl5/EBox/Util/Init.pm line 87
EBox::Util::Init::start at /usr/bin/zs line 35
main::main at /usr/bin/zs line 82
2019/07/18 06:03:43 ERROR> Service.pm:962 EBox::Module::Service::restartService - Error restarting service: Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
2019/07/18 06:03:43 ERROR> Service.pm:964 EBox::Module::Service::restartService - Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at /usr/share/perl5/EBox/Module/Service.pm line 964
EBox::Module::Service::restartService('EBox::Samba=HASH(0x5899bc0)', 'restartModules', 1) called at /usr/share/perl5/EBox/Util/Init.pm line 121
eval {...} at /usr/share/perl5/EBox/Util/Init.pm line 119
EBox::Util::Init::moduleAction('samba', 'restartService', 'start') called at /usr/share/perl5/EBox/Util/Init.pm line 87
EBox::Util::Init::start at /usr/bin/zs line 35
main::main at /usr/bin/zs line 82
2019/07/18 06:03:43 INFO> Service.pm:958 EBox::Module::Service::restartService - Restarting service for module: mail
2019/07/18 06:04:03 ERROR> LDAP.pm:196 EBox::Module::LDAP::_connectToSchemaMaster - Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at /usr/share/perl5/EBox/Module/LDAP.pm line 196
EBox::Module::LDAP::_connectToSchemaMaster('EBox::Mail=HASH(0x75e19b0)') called at /usr/share/perl5/EBox/Module/LDAP.pm line 275
EBox::Module::LDAP::_loadSchemasFiles('EBox::Mail=HASH(0x75e19b0)', 'ARRAY(0x7a93740)') called at /usr/share/perl5/EBox/Module/LDAP.pm line 267
EBox::Module::LDAP::_loadSchemas('EBox::Mail=HASH(0x75e19b0)') called at /usr/share/perl5/EBox/Module/LDAP.pm line 341
EBox::Module::LDAP::_performSetup('EBox::Mail=HASH(0x75e19b0)') called at /usr/share/perl5/EBox/Module/LDAP.pm line 331
EBox::Module::LDAP::_regenConfig('EBox::Mail=HASH(0x75e19b0)', 'restart', 1, 'restartModules', 1) called at /usr/share/perl5/EBox/Module/Kerberos.pm line 375
EBox::Module::Kerberos::_regenConfig('EBox::Mail=HASH(0x75e19b0)', 'restart', 1, 'restartModules', 1) called at /usr/share/perl5/EBox/Module/Service.pm line 960
eval {...} at /usr/share/perl5/EBox/Module/Service.pm line 959
EBox::Module::Service::restartService('EBox::Mail=HASH(0x75e19b0)', 'restartModules', 1) called at /usr/share/perl5/EBox/Util/Init.pm line 121
eval {...} at /usr/share/perl5/EBox/Util/Init.pm line 119
EBox::Util::Init::moduleAction('mail', 'restartService', 'start') called at /usr/share/perl5/EBox/Util/Init.pm line 87
EBox::Util::Init::start at /usr/bin/zs line 35
main::main at /usr/bin/zs line 82
2019/07/18 06:04:03 ERROR> Service.pm:962 EBox::Module::Service::restartService - Error restarting service: Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
2019/07/18 06:04:03 ERROR> Service.pm:964 EBox::Module::Service::restartService - Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at Error binding to schema master LDAP: An error occurred in C<Net::LDAP>
 at /usr/share/perl5/EBox/Module/Service.pm line 964
EBox::Module::Service::restartService('EBox::Mail=HASH(0x75e19b0)', 'restartModules', 1) called at /usr/share/perl5/EBox/Util/Init.pm line 121
eval {...} at /usr/share/perl5/EBox/Util/Init.pm line 119
EBox::Util::Init::moduleAction('mail', 'restartService', 'start') called at /usr/share/perl5/EBox/Util/Init.pm line 87
EBox::Util::Init::start at /usr/bin/zs line 35
main::main at /usr/bin/zs line 82
2019/07/18 06:04:03 INFO> Service.pm:958 EBox::Module::Service::restartService - Restarting service for module: webadmin
2019/07/18 06:04:05 INFO> Init.pm:90 EBox::Util::Init::start - Start modules finished
2019/07/18 09:04:20 DEBUG> PAM.pm:83 Authen::Simple::PAM::check - Successfully authenticated user 'soporte' using service 'zentyal'.

Title: Re: FALLA al crear un usuario nuevo
Post by: doncamilo on July 22, 2019, 11:14:09 am
 :)

Corre estos comandos en tu servidor zentyal y manda el resultado.
Code: [Select]
sudo samba-tool fsmo show
sudo samba-tool dbcheck --cross-ncs

Saludos.

Title: Re: FALLA al crear un usuario nuevo
Post by: AFGP on July 22, 2019, 02:58:32 pm
:)

Corre estos comandos en tu servidor zentyal y manda el resultado.
Code: [Select]
sudo samba-tool fsmo show
sudo samba-tool dbcheck --cross-ncs

Saludos.

Buen día

envió respuestas de comandos

Code: [Select]
root@zentyal2:/home/soporte# samba-tool fsmo show
ldb_wrap open of secrets.ldb
SchemaMasterRole owner: CN=NTDS Settings,CN=ZENTYALFW,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=latcom,DC=co
InfrastructureMasterRole owner: CN=NTDS Settings,CN=ZENTYALFW,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=latcom,DC=co
RidAllocationMasterRole owner: CN=NTDS Settings,CN=ZENTYALFW,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=latcom,DC=co
PdcEmulationMasterRole owner: CN=NTDS Settings,CN=ZENTYALFW,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=latcom,DC=co
DomainNamingMasterRole owner: CN=NTDS Settings,CN=ZENTYALFW,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=latcom,DC=co
DomainDnsZonesMasterRole owner: CN=NTDS Settings,CN=ZENTYALFW,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=latcom,DC=co
ForestDnsZonesMasterRole owner: CN=NTDS Settings,CN=ZENTYALFW,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=latcom,DC=co


root@zentyal2:/home/soporte# samba-tool dbcheck --cross-ncs
Checking 7444 objects
cn=latcom.tk\0ADEL:ac50eb46-7da4-4387-bb9a-4510322969b6,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co: 0x8f0e48a6
cn=latcom.tk\0ADEL:ac50eb46-7da4-4387-bb9a-4510322969b6,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co: 0x8f0e48a6
ERROR: duplicate attributeID values for virtualdomain in replPropertyMetaData on cn=latcom.tk\0ADEL:ac50eb46-7da4-4387-bb9a-4510322969b6,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co

Not fixing duplicate value 0x8f0e48a6 for virtualdomain in replPropertyMetaData on cn=latcom.tk\0ADEL:ac50eb46-7da4-4387-bb9a-4510322969b6,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co

cn=latcom.co\0ADEL:9ed36a78-a000-4c19-b58e-82d3cbbb4fc0,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co: 0x8f0e48a6
cn=latcom.co\0ADEL:9ed36a78-a000-4c19-b58e-82d3cbbb4fc0,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co: 0x8f0e48a6
ERROR: duplicate attributeID values for virtualdomain in replPropertyMetaData on cn=latcom.co\0ADEL:9ed36a78-a000-4c19-b58e-82d3cbbb4fc0,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co

Not fixing duplicate value 0x8f0e48a6 for virtualdomain in replPropertyMetaData on cn=latcom.co\0ADEL:9ed36a78-a000-4c19-b58e-82d3cbbb4fc0,CN=Deleted Objects,CN=Configuration,DC=latcom,DC=co

Please use --fix to fix these errors
Checked 7444 objects (2 errors)

Gracias por la ayuda.
Title: Re: FALLA al crear un usuario nuevo
Post by: doncamilo on July 22, 2019, 03:48:33 pm
 :)

Corre este comando para resolver los errores de la base de datos de Samba y prueba a crear un nuevo usuario:

Code: [Select]
samba-tool dbcheck --cross-ncs --fix
#Comprueba que la base de datos es ahora correcta
samba-tool dbcheck --cross-ncs

Desde webadmin crea un nuevo usuario. Si te da de nuevo un fallo pega aquí los logs pertinentes.

Saludos!

Title: Re: FALLA al crear un usuario nuevo
Post by: AFGP on July 22, 2019, 07:37:17 pm
:)

Corre este comando para resolver los errores de la base de datos de Samba y prueba a crear un nuevo usuario:

Code: [Select]
samba-tool dbcheck --cross-ncs --fix
#Comprueba que la base de datos es ahora correcta
samba-tool dbcheck --cross-ncs

Desde webadmin crea un nuevo usuario. Si te da de nuevo un fallo pega aquí los logs pertinentes.

Saludos!

Buen día

al ejecutar los comandos indicados aparecen "(0 errors)", pero igual mente no deja crear los usuarios, ni por entorno gráfico, ni consola, el error que retorna es:
Code: [Select]
Error en la creación del usuario LDAP: 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:{ 'userAccountControl' => 514, 'sAMAccountName' => 'ECF9960A', 'sn' => 'QUINTANA BECERRA', 'uidNumber' => 4221, 'objectClass' => [ 'top', 'person', 'organizationalPerson', 'user', 'posixAccount', 'systemQuotas' ], 'name' => 'KAREN LILIANA QUINTANA BECERRA', 'givenName' => 'KAREN LILIANA', 'cn' => 'KAREN LILIANA QUINTANA BECERRA', 'homeDirectory' => '/home/ECF9960A', 'quota' => 0, 'gidNumber' => '2513', 'dn' => 'CN=KAREN LILIANA QUINTANA BECERRA,CN=Users,DC=latcom,DC=co', 'userPrincipalName' => 'ECF9960A@LATCOM.CO', 'displayName' => 'KAREN LILIANA QUINTANA BECERRA' } at /usr/share/perl5/EBox/Samba/User.pm line 514


Adjunto log de zentyal /var/log/zentyal/zentyal.log

Code: [Select]
2019/07/22 12:30:34 ERROR> User.pm:514 EBox::Samba::User::create - Error en la creación del usuario LDAP:  The client attempted to add an entry that already exists. Th$
2019/07/22 12:30:34 ERROR> User.pm:554 EBox::Samba::User::create - Error en la creación del usuario LDAP:  The client attempted to add an entry that already exists. Th$
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:{
  'userPrincipalName' => 'ECF9960A@LATCOM.CO',
  'displayName' => 'KAREN LILIANA QUINTANA BECERRA',
  'dn' => 'CN=KAREN LILIANA QUINTANA BECERRA,CN=Users,DC=latcom,DC=co',
  'gidNumber' => '2513',
  'quota' => 0,
  'cn' => 'KAREN LILIANA QUINTANA BECERRA',
  'homeDirectory' => '/home/ECF9960A',
  'givenName' => 'KAREN LILIANA',
  'uidNumber' => 4221,
  'name' => 'KAREN LILIANA QUINTANA BECERRA',
  'objectClass' => [
                     'top',
                     'person',
                     'organizationalPerson',
 * 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:{
  'userPrincipalName' => 'ECF9960A@LATCOM.CO',
  'displayName' => 'KAREN LILIANA QUINTANA BECERRA',
  'dn' => 'CN=KAREN LILIANA QUINTANA BECERRA,CN=Users,DC=latcom,DC=co',
  'gidNumber' => '2513',
  'quota' => 0,
  'cn' => 'KAREN LILIANA QUINTANA BECERRA',
  'homeDirectory' => '/home/ECF9960A',
  'givenName' => 'KAREN LILIANA',
  'uidNumber' => 4221,
  'name' => 'KAREN LILIANA QUINTANA BECERRA',
  'objectClass' => [
                     'top',
                     'person',
                     'organizationalPerson',
                     'user',
                     'posixAccount',
                     'systemQuotas'
                   ],
  'sn' => 'QUINTANA BECERRA',
  'sAMAccountName' => 'ECF9960A',
  'userAccountControl' => 514
}

Title: Re: FALLA al crear un usuario nuevo
Post by: doncamilo on July 23, 2019, 03:55:22 pm
 :)

Me parece que este comentario tiene la solución: https://forum.zentyal.org/index.php/topic,30910.msg106492.html#msg106492 (https://forum.zentyal.org/index.php/topic,30910.msg106492.html#msg106492)

Un saludo!
Title: Re: FALLA al crear un usuario nuevo
Post by: AFGP on July 29, 2019, 07:01:41 pm
:)

Me parece que este comentario tiene la solución: https://forum.zentyal.org/index.php/topic,30910.msg106492.html#msg106492 (https://forum.zentyal.org/index.php/topic,30910.msg106492.html#msg106492)

Un saludo!

Buen día

muchas gracias doncamilo, por tu apoyo durante este post.

al final los dos comandos me funcionaron. El servidor que uso es una maquina virtual, subí un backup de unas semanas atrás con la fe de que este me funcionara, al encender este backup resulta que tenia la misma falla de crear usuarios, intente ejecutar los 2 comandos anterior mente mencionados, estos encontraron errores y los solucionaron, por ende me funcionaron.