Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <?php
  2. $username = 'ldapuser1';
  3. $password = 'f3ca9d298a553da117442deeb6fa932d';
  4. $ldapconfig['host'] = 'lightweight.htb';
  5. $ldapconfig['port'] = '389';
  6. $ldapconfig['basedn'] = 'dc=lightweight,dc=htb';
  7. //$ldapconfig['usersdn'] = 'cn=users';
  8. $ds=ldap_connect($ldapconfig['host'], $ldapconfig['port']);
  9. ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
  10. ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
  11. ldap_set_option($ds, LDAP_OPT_NETWORK_TIMEOUT, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement