diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-05-29 11:43:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:12 -0500 |
commit | 9e5bdc3c5dfe0bbfc60232ebf063bf59919c87b0 (patch) | |
tree | 5a92c5184aee385d004141cf8b58436670cdf601 | |
parent | 8754c793bfe79e87febb026e5915e054c23cfede (diff) | |
download | samba-9e5bdc3c5dfe0bbfc60232ebf063bf59919c87b0.tar.gz samba-9e5bdc3c5dfe0bbfc60232ebf063bf59919c87b0.tar.bz2 samba-9e5bdc3c5dfe0bbfc60232ebf063bf59919c87b0.zip |
r7073: added some simple example scripts for use with smbscript
(This used to be commit f1d0c006600d6d57bce2ede87a1aae0ccfc2c412)
-rw-r--r-- | testprogs/ejs/ldb.js | 24 | ||||
-rw-r--r-- | testprogs/ejs/loadparm.js | 19 |
2 files changed, 43 insertions, 0 deletions
diff --git a/testprogs/ejs/ldb.js b/testprogs/ejs/ldb.js new file mode 100644 index 0000000000..7675197904 --- /dev/null +++ b/testprogs/ejs/ldb.js @@ -0,0 +1,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"); diff --git a/testprogs/ejs/loadparm.js b/testprogs/ejs/loadparm.js new file mode 100644 index 0000000000..fdeaed9d34 --- /dev/null +++ b/testprogs/ejs/loadparm.js @@ -0,0 +1,19 @@ +/* + demonstrate access to loadparm functions from ejs +*/ + +print("defined services: "); +printVars(lpServices()); + +function showParameter(name) { + print(name + ": "); + printVars(lpGet(name)); +} + +showParameter("server services"); +showParameter("netbios name"); +showParameter("security"); +showParameter("workgroup"); +showParameter("log level"); +showParameter("server signing"); +showParameter("interfaces"); |