You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-11-08 11:28:09

teguh.umar
Member
From: Indonesia
Registered: 2011-05-20
Posts: 161

AD Bind use dinamic username

Is there any way to bind AD using user own username and password?

for example :
sample :
                $domain2 = 'contoso\\';
                $ldap['user'] = strtolower($username);
                $ldap['pass'] = $password;
                $ldap['host2'] = '10.10.10.4';
                $ldap['port'] = 389;

                $ldap['conn2'] = ldap_connect($ldap['host2'], $ldap['port']);

                ldap_set_option($ldap['conn2'], LDAP_OPT_PROTOCOL_VERSION, 3);
               
                $ldap['bind2'] = @ldap_bind($ldap['conn2'], $domain2 . $ldap['user'], $ldap['pass']);
                   
                if(!$ldap['bind'] && !$ldap['bind2']){
                    {{fail}}
                } else {
                    {{success}}
                    ldap_close($ldap['conn']);
               }

is there a way to do it?


GLPI 10.0.10
Installation mode: zip on OREL9

Offline

Board footer

Powered by FluxBB