1

I have tried these configuration using Laravel 5.1 enterprise starter kit:

http://www.forumsys.com/en/tutorials/integration-how-to/ldap/online-ldap-test-server/

Server: ldap.forumsys.com

Port: 389

Bind DN: cn=read-only-admin,dc=example,dc=com Bind Password: password

All user passwords are password.

You may also bind to individual Users (uid) or the two Groups (ou) that include:

ou=mathematicians,dc=example,dc=com riemann gauss euler euclid

ou=scientists,dc=example,dc=com einstein newton galieleo tesla

so the configuration is like this

                            LDAP.ENABLED=true
                            LDAP.CREATE_ACCOUNTS=true
                            LDAP.REPLICATE_GROUP_MEMBERSHIP=true
                            LDAP.RESYNC_ON_LOGIN=true
                            LDAP.GROUP_MODEL=App\Models\Role
                            LDAP.LABEL_INTERNAL=internal
                            LDAP.LABEL_LDAP=ldap
                            LDAP.ACCOUNT_SUFFIX=
                            LDAP.BASE_DN=dc=example,dc=com
                            LDAP.SERVER=ldap.forumsys.com
                            LDAP.PORT=389
                            LDAP.USER_NAME=cn=read-only-admin,dc=example,dc=com
                            LDAP.PASSWORD=password
                            LDAP.RETURN_REAL_PRIMARY_GROUP=true
                            LDAP.SECURED=false
                            LDAP.SECURED_PORT=636
                            LDAP.RECURSIVE_GROUPS=true
                            LDAP.SSO=false
                            LDAP.USERNAME_FIELD=samaccountname
                            LDAP.EMAIL_FIELD=userprincipalname
                            LDAP.FIRST_NAME_FIELD=givenname
                            LDAP.LAST_NAME_FIELD=sn
                            LDAP.USER_FILTER=(&(objectcategory=person)(samaccountname=%username))

But I cant login, and log debugbar said

development.error : Exception retrieving user information: Undefined variable: username

I try using other method by LDAP Admin, and it works charm like this screenshot

Can you help me?

img

toha
  • 5,095
  • 4
  • 40
  • 52
  • I have tried it too http://www.zflexldapadministrator.com/index.php/blog/82-free-online-ldap when I try use it with LDAP Admin I can connect, but by using https://github.com/sroutier/eloquent-ldap/ I cant. please help me – Yazir Rizki Sep 20 '16 at 00:14
  • On what line of which file are you getting the error? – linuxartisan Sep 20 '16 at 02:36
  • \vendor\adldap2\adldap2\src\Adldap.php(400): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined variable username' – Yazir Rizki Sep 20 '16 at 03:56

0 Answers0