% page_header("columns", "ESP ldb test", "esptest"); %>
Samba4 ldb test
An attribute constrained search
<%
var lp = loadparm_init();
var dbfile = lp.get("sam database");
var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
var ldb = ldb_init();
ldb.session_info = session.authinfo.session_info;
var ok = ldb.connect(dbfile);
assert(ok);
res = ldb.search("(objectClass=domain)", NULL, ldb.SCOPE_DEFAULT, attrs);
multi_table(res, "dn");
%>
An unconstrained search
<%
res = ldb.search("(objectClass=user)");
multi_table(res, "dn");
%>
A search with bad arguments
<%
res = ldb.search("=blah", "foo");
%>
all done
<% page_footer() %>