% page_header("columns", "ESP ldb test"); %>
Samba4 ldb test
An attribute constrained search
<%
var dbfile = lpGet("sam database");
var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
var ldb = ldb_init();
var ok = ldb.connect(dbfile);
assert(ok);
res = ldb.search("(objectClass=domain)", 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() %>