mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
9e5bdc3c5d
(This used to be commit f1d0c00660
)
25 lines
508 B
JavaScript
25 lines
508 B
JavaScript
/*
|
|
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");
|