Guest User

Untitled

a guest
May 27th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <cfscript>
  2. /*
  3. TEST LDAP Server Information (read-only access):
  4.  
  5. Server: ldap.forumsys.com
  6. Port: 389
  7.  
  8. Bind DN: cn=read-only-admin,dc=example,dc=com
  9. Bind Password: password
  10.  
  11. All user passwords are password.
  12.  
  13. You may also bind to individual Users (uid) or the
  14. two Groups (ou) that include:
  15.  
  16. ou=mathematicians,dc=example,dc=com
  17.  
  18. riemann
  19. gauss
  20. euler
  21. euclid
  22. ou=scientists,dc=example,dc=com
  23.  
  24. einstein
  25. newton
  26. galieleo
  27. tesla
  28. */
  29. doLDAPCall();
  30.  
  31. function doLDAPCall(){
  32. local.server = "ldap.forumsys.com";
  33. local.port = 389;
  34. local.dn = "cn=read-only-admin,dc=example,dc=com";
  35. local.start = "ou=scientists,dc=example,dc=com";
  36. local.username = "einstein";
  37. local.password = "password";
  38.  
  39. cfldap(
  40. server = local.server,
  41. port = local.port,
  42. dn = local.dn,
  43. action = "QUERY",
  44. name = "qLDAPLookup",
  45. password = local.password,
  46. start = local.start,
  47. attributes = "*",
  48. scope = "subtree",
  49. filter = "(sAMAccountName=#local.username#)"
  50. );
  51.  
  52. writeDump(qLDAPLookup);
  53. }
  54. </cfscript>
Add Comment
Please, Sign In to add comment