1 <% page_header("columns", "ESP ldb test"); %>
3 <h1>Samba4 ldb test</h1>
5 <form name="LdbTest" method="post" action="@@request['SCRIPT_NAME']">
6 <input name="submit" type="submit" value="Cancel" /><br />
10 if (request['REQUEST_METHOD'] == "POST") {
11 /* if they cancelled then take them back to the list of tests */
12 if (form['submit'] == "Cancel") {
18 hmm, this gets fairly involved ...
20 function showLdbRes(res) {
25 if (typeof(a) == "object") {
27 write(j + "[" + k + "]=" + a[k] + "<br />\n");
30 write(j + "=" + r[j] + "<br />\n");
39 Trying a attribute constrained search on samdb:<p>
42 var dbfile = lpGet("sam database");
43 var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
45 res = ldbSearch(dbfile, "(objectClass=domain)", attrs);
49 and now an unconstrained search:<p>
52 var dbfile = lpGet("sam database");
54 res = ldbSearch(dbfile, "(objectClass=user)");
61 res = ldbSearch("foo");