source: trunk/server/swat2/esptest/samr.esp@ 689

Last change on this file since 689 was 414, checked in by Herwig Bauernfeind, 16 years ago

Samba 3.5.0: Initial import

File size: 809 bytes
Line 
1<% page_header("columns", "ESP samr test", "esptest");
2
3 libinclude("base.js");
4 libinclude("samr.js");
5%>
6
7<h1>Samba4 samr rpc test</h1>
8
9<%
10var conn = samr_init();
11var binding = "ncalrpc:";
12status = conn.connect(binding);
13check_status_ok(status);
14
15handle = samrConnect(conn);
16
17domains = samrEnumDomains(conn, handle);
18
19for (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");
27 } else {
28 multi_table(users, "name");
29 }
30 samrClose(conn, dom_handle);
31}
32
33%>
34
35
36<% page_footer(); %>
Note: See TracBrowser for help on using the repository browser.