How to revert LDAP configuration from JMX to alfresco-global.properties

If you made breaking changes through Alfresco admin console (JMX) to your LDAP subsystem, and found yourself with an unusable repository and the admin console unreachable, you can solve this problem by switching back to alfresco-global.properties configuration, following these steps.

  1. Stop Alfresco (make sure you have no probes in case you run it on Kubernetes)
  2. Enable JMX on alfresco-global.properties
    • alfresco.jmx.connector.enabled=true
  3. Start Alfresco
  4. Download JMX TERM
    • curl -O -L https://github.com/jiaqi/jmxterm/releases/download/v1.0.2/jmxterm-1.0.2-uber.jarr
  5. Execute JMX TERM
    • java -jar jmxterm-1.0.2-uber.jar
  6. Connect to Alfresco
    • open service:jmx:rmi:///jndi/rmi://localhost:50500/alfresco/jmxrmi -p change_asap -u controlRole
  7. Set the LDAP bean
    • bean Alfresco:Category=Authentication,Type=Configuration,id1=managed,id2=ldap1
  8. Revert changes
    • run revert