cancel
Showing results for 
Search instead for 
Did you mean: 

No consigo logarme con LDAP (SOLUCIONADO)

volasolo_9270
Champ in-the-making
Champ in-the-making
Hola a todos,
a ver si podéis ayudarme, estoy ya un poco desesperado. Hice pruebas con Alfresco Lab 3.0 y el LDAP de mi empresa y conseguí configurarlo correctamente. He instalado en un servidor la misma versión Alfresco sobre Red Hat 5 y con MySql para hacer lo mismo con el LDAP del cliente. Resulta que me da errores de CIF, ftp, samba etc que antes no me daba (todo el log de arranque era correcto). La cuestión es que arranca pero no me reconoce el usuario/password del LDAP. Pongo el log .

Jul 29, 2009 12:00:43 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 29, 2009 12:00:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 437 ms
Jul 29, 2009 12:00:43 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 29, 2009 12:00:43 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Jul 29, 2009 12:00:43 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
12:00:46,441  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
Jul 29, 2009 12:00:46 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive studio.war
12:00:48,375  INFO  [web.scripts.DeclarativeRegistry] Registered 67 Web Scripts (+0 failed), 71 URLs
12:00:48,376  INFO  [web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 303.27902ms)
12:01:48,758  INFO  [web.scripts.DeclarativeRegistry] Registered 101 Web Scripts (+0 failed), 105 URLs
12:01:48,759  INFO  [web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 60366.742ms)
12:01:48,806  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
Jul 29, 2009 12:01:48 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jul 29, 2009 12:01:49 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
12:02:00,586  INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
12:02:08,064  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
12:02:08,451  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
12:02:10,941 User:System INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /opt/alfresco/alf_data
12:02:11,008 User:System INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
12:02:11,259 User:System INFO  [admin.patch.PatchExecuter] No patches were required.
12:02:11,262 User:System INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
12:02:11,378 User:System ERROR [smb.protocol.auth] No valid CIFS authentication combination available
12:02:11,378 User:System ERROR [smb.protocol.auth] Either enable Kerberos support or use an authentication component that supports MD4 hashed passwords
12:02:11,379 User:System ERROR [alfresco.smb.protocol] CIFS server configuration error, Invalid CIFS authenticator configuration
org.alfresco.error.AlfrescoRuntimeException: Invalid CIFS authenticator configuration
        at org.alfresco.filesys.auth.cifs.EnterpriseCifsAuthenticator.initialize(EnterpriseCifsAuthenticator.java:389)
        at org.alfresco.jlan.smb.server.CIFSConfigSection.setAuthenticator(CIFSConfigSection.java:607)
        at org.alfresco.filesys.ServerConfigurationBean.processCIFSServerConfig(ServerConfigurationBean.java:881)
        at org.alfresco.filesys.ServerConfigurationBean.init(ServerConfigurationBean.java:546)
        at org.alfresco.filesys.ServerConfigurationBean.onApplicationEvent(ServerConfigurationBean.java:3098)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
12:02:11,382 User:System ERROR [alfresco.smb.protocol] FTP server configuration error, Wrong authentication setup for alfresco authenticator
org.alfresco.error.AlfrescoRuntimeException: Wrong authentication setup for alfresco authenticator
        at org.alfresco.filesys.ServerConfigurationBean.processFTPServerConfig(ServerConfigurationBean.java:1833)
        at org.alfresco.filesys.ServerConfigurationBean.init(ServerConfigurationBean.java:580)
        at org.alfresco.filesys.ServerConfigurationBean.onApplicationEvent(ServerConfigurationBean.java:3098)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
12:02:11,562 User:System INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_14-b08; maximum heap size 1820.500MB
12:02:11,562 User:System INFO  [service.descriptor.DescriptorService] Alfresco started (Labs): Current version 3.0.0 (Stable 1526) schema 1002 - Installed version 3.0.0 (Stable 1526) schema 1002
Jul 29, 2009 12:02:21 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 29, 2009 12:02:21 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 98255 ms

Gracias por adelantado.
9 REPLIES 9

fstnboy
Champ on-the-rise
Champ on-the-rise
Buenas volasolo,

Podrías postear los archivos de configuración que has tocado, de forma que podamos ver si hay algo mal configurado?

volasolo_9270
Champ in-the-making
Champ in-the-making
Gracias por la respuesta,
La verdad es que he probado ya varias cosas. Lo último que tengo es para el fichero ldap-authentication.properties lo siguiente:
#
# This properties file brings together the common options for LDAP authentication rather than editing the bean definitions
#

# How to map the user id entered by the user to taht passed through to LDAP
# - simple
#    - this must be a DN and would be something like
#      CN=%s,DC=company,DC=com
# - digest
#    - usually pass through what is entered
#      %s
ldap.authentication.userNameFormat=%s

# The LDAP context factory to use
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

# The URL to connect to the LDAP server
# ldap.authentication.java.naming.provider.url=ldap://openldap.domain.com:389

# Servidor LDAP de la compañia

ldap.authentication.java.naming.provider.url=ldap://metaldap.company.es:389

# The authentication mechanism to use
ldap.authentication.java.naming.security.authentication=DIGEST-MD5
# ldap.authentication.java.naming.security.authentication=SIMPLE

# The default principal to use (only used for LDAP sync)
ldap.authentication.java.naming.security.principal=reader

# The password for the default principal (only used for LDAP sync)
ldap.authentication.java.naming.security.credentials=secret

# Escape commas entered by the user at bind time
# Useful when using simple authentication and the CN is part of the DN and contains commas
ldap.authentication.escapeCommasInBind=false

# Escape commas entered by the user when setting the authenticated user
# Useful when using simple authentication and the CN is part of the DN and contains commas, and the escaped \, is
# pulled in as part of an LDAP sync
# If this option is set to true it will break the default home folder provider as space names can not contain \
ldap.authentication.escapeCommasInUid=false
[root@ealfresco extension]#

y para el archivo ldap-authentication-context.xml he probado con

<property name="userNameFormat">
        <value>uid=%s,ou=People,o=dir.es</value>
      </property>


lo cambie por esto:

<property name="userNameFormat">
        <value>%s</value>
      </property>

No comprendo bien que es "ou" y "o" ¿Pueden ser los datos que me han dado de contendor de usuarios y contendor de grupos?
Por telnet conecto con el servidor.

Gracias por interesarte.

fstnboy
Champ on-the-rise
Champ on-the-rise
Podrias mandar también el contenido del fichero file-servers.xml?

volasolo_9270
Champ in-the-making
Champ in-the-making
Realmente no he tocado este fichero…
existe el xml y el xml.sample

<alfresco-config area="file-servers">

   <!– To override the default Alfresco filesystem use replace="true", to –>
   <!– add additional filesystems remove the replace="true" attribute     –>

   <config evaluator="string-compare" condition="Filesystems" replace="true">
      <filesystems>

         <filesystem name="Alfresco">
            <store>workspace://SpacesStore</store>
            <rootPath>/app:company_home</rootPath>

            <!– Add a URL file to each folder that links back to the web client –>
            <urlFile>
               <filename>__Alfresco.url</filename>
               <webpath>http://${localname}:8080/alfresco/</webpath>
            </urlFile>

            <!– Mark locked files as offline –>
            <offlineFiles/>

            <!– Desktop actions –>

            <desktopActions>
               <global>
                  <path>alfresco/desktop/Alfresco.exe</path>
                  <webpath>http://${localname}:8080/alfresco/</webpath>
               </global>
               <action>
                  <class>org.alfresco.filesys.repo.desk.CheckInOutDesktopAction</class>
                  <name>CheckInOut</name>
                  <filename>__CheckInOut.exe</filename>
               </action>
               <action>
                  <class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
                  <name>JavaScriptURL</name>
                  <filename>__ShowDetails.exe</filename>
                  <script>alfresco/desktop/showDetails.js</script>
                  <attributes>anyFiles</attributes>
                  <preprocess>copyToTarget</preprocess>
               </action>

            </desktopActions>

<!–
            <accessControl default="Write">
               <user name="admin" access="Write"/>
               <address subnet="90.1.0.0" mask="255.255.0.0" access="Write"/>
            </accessControl>
–>
         </filesystem>

                 <!– AVM virtualization view of all stores/versions for WCM –>
         <avmfilesystem name="AVM">
            <virtualView/>
         </avmfilesystem>

      </filesystems>
   </config>

</alfresco-config>

Gracias

fstnboy
Champ on-the-rise
Champ on-the-rise
A ver si es tema de configuración de la seguridad…

Prueba a crearte un file-servers-custom.xml con el siguiente contenido:


<alfresco-config area="file-servers">

   <!– To override the default Alfresco filesystem use replace="true", to –>
   <!– add additional filesystems remove the replace="true" attribute     –>

   <config evaluator="string-compare" condition="Filesystems" replace="true">
      <filesystems>

         <filesystem name="Alfresco">
            <store>workspace://SpacesStore</store>
            <rootPath>/app:company_home</rootPath>

            <!– Add a URL file to each folder that links back to the web client –>
            <urlFile>
               <filename>__Alfresco.url</filename>
               <webpath>http://${localname}:8080/alfresco/</webpath>
            </urlFile>

            <!– Mark locked files as offline –>
            <offlineFiles/>

            <!– Desktop actions –>

            <desktopActions>
               <global>
                  <path>alfresco/desktop/Alfresco.exe</path>
                  <webpath>http://${localname}:8080/alfresco/</webpath>
               </global>
               <action>
                  <class>org.alfresco.filesys.repo.desk.CheckInOutDesktopAction</class>
                  <name>CheckInOut</name>
                  <filename>__CheckInOut.exe</filename>
               </action>
               <action>
                  <class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
                  <name>JavaScriptURL</name>
                  <filename>__ShowDetails.exe</filename>
                  <script>alfresco/desktop/showDetails.js</script>
                  <attributes>anyFiles</attributes>
                  <preprocess>copyToTarget</preprocess>
               </action>

            </desktopActions>

<!–
            <accessControl default="Write">
               <user name="admin" access="Write"/>
               <address subnet="90.1.0.0" mask="255.255.0.0" access="Write"/>
            </accessControl>
–>
         </filesystem>

                 <!– AVM virtualization view of all stores/versions for WCM –>
         <avmfilesystem name="AVM">
            <virtualView/>
         </avmfilesystem>

      </filesystems>
   </config>
   <config evaluator="string-compare" condition="Filesystem Security">
      <authenticator type="alfresco">
      </authenticator>
   </config>

</alfresco-config>

Lo único que he añadido ha sido el…

   <config evaluator="string-compare" condition="Filesystem Security">
      <authenticator type="alfresco">
      </authenticator>
   </config>

La verdad, que nunca he usado el Labs 3, igual es algo distinto, pero por probar…
Pruébalo y nos lo comentas.

Saludos.

volasolo_9270
Champ in-the-making
Champ in-the-making
Disculpa, ayer salí de trabajar. He probado y no varia nada ni el arranque ni el comportamiento :cry:. Sigo buscando… Lo cierto es que esto de Alfresco es bastante tortuoso cada pasito es un triunfo.
Admito cualquier sugerencia

fstnboy
Champ on-the-rise
Champ on-the-rise
Échale un ojo a este post del foro inglés a ver si te sirve de algo…

http://forums.alfresco.com/en/viewtopic.php?t=14741

volasolo_9270
Champ in-the-making
Champ in-the-making
Hola a todos,
Por fin conseguí que el login de Alfresco por LDAP funcione. Realmente lo que ocurrió es que por un lado el cliente me dio una información incompleta de las caracrteristicas de su LDAP y por otro que el fichero ldap-authentication-context.xml estaba mal configurado. Eso sí CIFS y FTP han dejado de funcionar (de momento no me importa y he visto soluciones en este foro) Os pongo la configuración de los archivos ldap-authentication.properties y ldap-authentication-context.xml por si a alguien le sirve…

# This properties file brings together the common options for LDAP authentication rather than editing the bean definitions
#

# How to map the user id entered by the user to taht passed through to LDAP
# - simple
#    - this must be a DN and would be something like
#      CN=%s,DC=company,DC=com
# - digest
#    - usually pass through what is entered
#      %s
# ldap.authentication.userNameFormat=%s

ldap.authentication.userNameFormat=cn=%s,o=users

# The LDAP context factory to use
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

# The URL to connect to the LDAP server
# ldap.authentication.java.naming.provider.url=ldap://openldap.domain.com:389

# Servidor LDAP.

ldap.authentication.java.naming.provider.url=ldap://ldap.empresa.es:389

# The authentication mechanism to use
# ldap.authentication.java.naming.security.authentication=DIGEST-MD5
ldap.authentication.java.naming.security.authentication=SIMPLE

# The default principal to use (only used for LDAP sync)
# ldap.authentication.java.naming.security.principal=reader

# The password for the default principal (only used for LDAP sync)
# ldap.authentication.java.naming.security.credentials=secret

# Escape commas entered by the user at bind time
# Useful when using simple authentication and the CN is part of the DN and contains commas
ldap.authentication.escapeCommasInBind=false

# Escape commas entered by the user when setting the authenticated user
# Useful when using simple authentication and the CN is part of the DN and contains commas, and the escaped \, is
# pulled in as part of an LDAP sync
# If this option is set to true it will break the default home folder provider as space names can not contain \
                                                                                              

Pongo unicamente lo que cambia.  <value>cn=%s,o=users</value>


 <property name="userNameFormat">

        <value>cn=%s,o=users</value>

        <!–

            This maps between what the user types in and what is passed through to the underlying LDAP authentication.

            "%s" - the user id is passed through without modification.
            Used for LDAP authentication such as DIGEST-MD5, anything that is not "simple".

            "cn=%s,ou=London,dc=company,dc=com" - If the user types in "Joe Bloggs" the authenticate as "cn=Joe Bloggs,ou=London,dc=company,dc=com"
            Usually for simple authentication. Simple authentication always uses the DN for the user.


            <value>${ldap.authentication.userNameFormat}</value>
–>

Hay que poner la estructura del LDAP en estos dos ficheros de configuración. Una cosa que me ayudo fue que comenté la linea userNameFormat en ldap-authentication.properties y arranque Alfresco. En el campo user de la página de login introduje todo el string base LDAP, es decir cn=usuario,o=users y la contraseña del usuario en el  campo contraseña y también entra.
Muchas gracias por todo, espero que esto ayude.

yaselc
Champ in-the-making
Champ in-the-making
Estuve leyendo el post y tengo el mismo problema, solo que yo consigo autenticarme con mi usuario del ldap, pero debo poner el dominio, algo así como miusuario@midominio.
Mi fichero ldap-authentication.properties tiene esta configuracuión


ldap.authentication.userNameFormat=cn=%s, ou=Systems, ou=UCI Domain Impersonals, dc=uci, dc=cu

#ldap.authentication.userNameFormat=%s


# The LDAP context factory to use

ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory



# The URL to connect to the LDAP server

ldap.authentication.java.naming.provider.url=ldap://ldapserver:389



# The authentication mechanism to use

ldap.authentication.java.naming.security.authentication=simple



# The default principal to use (only used for LDAP sync)

ldap.authentication.java.naming.security.principal=cn=ad search, ou=Systems, ou=UCI Domain Impersonals, dc=uci, dc=cu



# The password for the default principal (only used for LDAP sync)

ldap.authentication.java.naming.security.credentials=**************************

Cuando uso el valor %s para la variable ldap.authentication.userNameFormat, me puedo autenticar perfectamente, pero usando el formato del nombre de usuario que les especifiqué antes, pero cuando uso el segundo valor, que si se fijan es el que uso para la variable ldap.authentication.java.naming.security.principal, entonces no me puedo autenticar.
Espero que me ayuden con este tema, mi objetivo es que solo tenga que poner el nombre de usuario para autenticarme y eliminar la cadena del nombre del dominio.
Gracias de antemano por la ayuda
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.