1 <% page_header("columns", "ESP samr test", "esptest");
7 <h1>Samba4 samr rpc test</h1>
10 var conn = samr_init();
11 var binding = "ncalrpc:";
12 status = conn.connect(binding);
13 check_status_ok(status);
15 handle = samrConnect(conn);
17 domains = samrEnumDomains(conn, handle);
19 for (i=0;i<domains.length;i++) {
20 write("<h2>Domain " + domains[i].name + "</h2>\n");
21 sid = samrLookupDomain(conn, handle, domains[i].name);
22 dom_handle = samrOpenDomain(conn, handle, sid);
23 users = samrEnumDomainUsers(conn, dom_handle);
24 samrFillUserInfo(conn, dom_handle, users, 3);
25 if (users.length == 0) {
26 write("no users in domain<br>\n");
28 multi_table(users, "name");
30 samrClose(conn, dom_handle);