Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = 'ldapuser1';
- $password = 'f3ca9d298a553da117442deeb6fa932d';
- $ldapconfig['host'] = 'lightweight.htb';
- $ldapconfig['port'] = '389';
- $ldapconfig['basedn'] = 'dc=lightweight,dc=htb';
- //$ldapconfig['usersdn'] = 'cn=users';
- $ds=ldap_connect($ldapconfig['host'], $ldapconfig['port']);
- ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
- ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
- ldap_set_option($ds, LDAP_OPT_NETWORK_TIMEOUT, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement