1 | #!/usr/bin/python |
---|
2 | import xmlrpclib |
---|
3 | |
---|
4 | |
---|
5 | ip_server = '10.0.0.248' |
---|
6 | |
---|
7 | c = xmlrpclib.ServerProxy("https://"+ip_server+":9779") |
---|
8 | #c = xmlrpclib.ServerProxy("https://192.168.1.2:9779") |
---|
9 | user = ("lliurex","lliurex") |
---|
10 | #print c.get_methods("SlapdManager") |
---|
11 | print c.generate_ssl_certificates(user,"SlapdManager") |
---|
12 | print c.load_lliurex_schema(user,"SlapdManager") |
---|
13 | print c.enable_tls_communication(user,"SlapdManager",'/etc/ldap/slapd.cert','/etc/ldap/slapd.key') |
---|
14 | #c.restore(user,"SlapdManager") |
---|
15 | #c.configure_client_slapd(user,"SlapdManager") |
---|
16 | #c.configure_master_slapd(user,"SlapdManager") |
---|
17 | print c.configure_simple_slapd(user,"SlapdManager") |
---|
18 | print c.load_acl(user,"SlapdManager") |
---|
19 | print c.open_ports_slapd(user,"SlapdManager",ip_server) |
---|
20 | print c.reboot_slapd(user,"SlapdManager") |
---|
21 | print c.load_basic_struture(user,"SlapdManager") |
---|
22 | print c.change_admin_passwd(user,"SlapdManager","lliurex") |
---|
23 | print c.enable_folders(user,"SlapdManager") |
---|
24 | #c.update_index(user,"SlapdManager") |
---|
25 | #c.test(user,"SlapdManager") |
---|
26 | #c.backup(user,"SlapdManager") |
---|
27 | #c.load_schema(user,"SlapdManager") |
---|
28 | ''' |
---|
29 | print c.reset_slapd(user,'SlapdManager') |
---|
30 | ''' |
---|