The Elearning Community • LDAP integration
Page 1 of 1

LDAP integration

Posted: Fri Feb 28, 2025 3:55 am
by marioja
The documentation is not very detailed about configuration for ldap.

Question: is there a step by step on how to configure LDAP integration using the formalms ui. The only UI part I found is:

after logon with admin user, click on settings gear icon:

in the top menu click on settings/System configuration/settings

Under configuration, there are only 3 ldap settings: port, activate and server address

if I specify those 3 values, the ldap integration does not work, i specify the ldap user and ldap user pw, and the page returns access denied, please check your password. Are there settings that can be put in the config.php that can make the integration work. I tried:

Code: Select all

  echo "
  // LDAP Configuration
  \$cfg['user_pwd_type'] = 'ldap';
  \$cfg['ldap_host'] = '${LDAP_HOST}';
  \$cfg['ldap_port'] = '${LDAP_PORT}';
  \$cfg['ldap_base_dn'] = '${LDAP_BASE_DN}';
  \$cfg['ldap_bind_dn'] = '${LDAP_BIND_DN}';
  \$cfg['ldap_bind_password'] = '${pw}';
  \$cfg['ldap_filter'] = '${LDAP_USER_FILTER}';
  \$cfg['ldap_user_attr'] = '${LDAP_USERNAME_ATTRIBUTE}';
  \$cfg['ldap_realname_attr'] = '${LDAP_REALNAME_ATTRIBUTE}';
  \$cfg['ldap_email_attr'] = '${LDAP_EMAIL_ATTRIBUTE}';
  " >> /app/formalms/config.php
with these variables

Code: Select all

      LDAP_HOST: "ldap.abc.local"
      LDAP_PORT: "389"
      LDAP_BASE_DN: "dc=abc,dc=c2,dc=us"
      LDAP_BIND_DN: "cn=adminldap,cn=nasAccount,cn=Syno,dc=abc,dc=c2,dc=us"
      LDAP_USER_FILTER: "(&(objectClass=person)(uid=%u))"
      LDAP_USERNAME_ATTRIBUTE: "uid"
      LDAP_REALNAME_ATTRIBUTE: "cn"
      LDAP_EMAIL_ATTRIBUTE: "mail"
but that does not work either. I see that some variables are written to the database so should they be stored in the database to work?

Re: LDAP integration

Posted: Fri Feb 28, 2025 5:35 am
by alfa24

Re: LDAP integration

Posted: Fri Feb 28, 2025 9:27 pm
by marioja
I had read these posts. They do not shed much light

Re: LDAP integration

Posted: Sat Mar 01, 2025 10:18 am
by alfa24
You should share more detailed debug info, such as what call are you making and most important your server response.
LDAP is not much used by forma users so it could be a little bugged but I made it work successfully on a development env.
I can suggest to try with the simplest scenario using a test server: https://www.forumsys.com/2022/05/10/onl ... st-server/