% 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 db = ldb.connect(dbfile);
res = ldb.search(db, "(objectClass=domain)", attrs);
multi_table(res, "dn");
%>
An unconstrained search
<%
res = ldb.search(db, "(objectClass=user)");
multi_table(res, "dn");
%>
A search with bad arguments
<%
res = ldb.search("blah", "foo");
%>
all done
<% page_footer() %>