blob: 7675197904eb7c48ee40e23027a6189b97b25189 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
demonstrate access to ldb databases from ejs
*/
println("Trying a attribute constrained search on samdb");
var dbfile = lpGet("sam database");
var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
res = ldbSearch(dbfile, "(objectClass=domain)", attrs);
printVars(res);
println("and now an unconstrained search");
var dbfile = lpGet("sam database");
res = ldbSearch(dbfile, "(objectClass=user)");
printVars(res);
println("and a bad search");
res = ldbSearch("foo");
println("all done");
|