|
|||
![]() |
Lecture Notes: 20 Oct 2010 | ||
LDAP
Specifics of our directory
Basic search using command-line tool: ldapsearch -x -b 'ou=People,dc=comfsm,dc=fm' '(uid=peterp)'
The search can be fairly complex. A good tutorial on search filters helps. The PHP interface $li=ldap_connect('shark.palikir');
ldap_set_option($li, LDAP_OPT_PROTOCOL_VERSION, 3);
$okay=ldap_bind($li); // Anonymous bind
if ($okay) {
//
// Your code goes here
//
}
ldap_unbind($li);
After that, use ldap_search or ldap_list. Results are returned through a result_identifier that is used to iterate through the matching records (with ldap_first_entry and ldap_next_entry) or to retrieve the entire set of matches (with ldap_get_entries). Assignment #6 Due: Friday 29 October
|
|||
Page last updated 19 October 2010 |