self.winsdb = None
self.private_dir = None
self.state_dir = None
- self.phpldapadminconfig = None
class ProvisionNames(object):
logger.info("DNS Domain: %s", self.names.dnsdomain)
logger.info("DOMAIN SID: %s", self.domainsid)
- if self.paths.phpldapadminconfig is not None:
- logger.info(
- "A phpLDAPadmin configuration file suitable for administering "
- "the Samba 4 LDAP server has been created in %s.",
- self.paths.phpldapadminconfig)
-
if self.backend_result:
self.backend_result.report_logger(logger)
paths.krb5conf = os.path.join(paths.private_dir, "krb5.conf")
paths.winsdb = os.path.join(paths.private_dir, "wins.ldb")
paths.s4_ldapi_path = os.path.join(paths.private_dir, "ldapi")
- paths.phpldapadminconfig = os.path.join(paths.private_dir,
- "phpldapadmin-config.php")
paths.hklm = "hklm.ldb"
paths.hkcr = "hkcr.ldb"
paths.hkcu = "hkcu.ldb"
backend_result = provision_backend.post_setup()
provision_backend.shutdown()
- create_phpldapadmin_config(paths.phpldapadminconfig,
- ldapi_url)
except:
secrets_ldb.transaction_cancel()
raise
return res
-def create_phpldapadmin_config(path, ldapi_uri):
- """Create a PHP LDAP admin configuration file.
-
- :param path: Path to write the configuration to.
- """
- setup_file(setup_path("phpldapadmin-config.php"), path,
- {"S4_LDAPI_URI": ldapi_uri})
-
-
def create_krb5_conf(path, dnsdomain, hostname, realm):
"""Write out a file containing zone statements suitable for inclusion in a
named.conf file (including GSS-TSIG configuration).
def test_setup_samdb_partitions(self):
raise NotImplementedError(self.test_setup_samdb_partitions)
- def test_create_phpldapadmin_config(self):
- raise NotImplementedError(self.test_create_phpldapadmin_config)
-
def test_provision_dns(self):
raise NotImplementedError(self.test_provision_dns)
('INFO', 'DNS Domain: dnsdomein'),
('INFO', 'DOMAIN SID: S1-1-1')])
- def test_report_logger_phpldapadmin(self):
- result = self.base_result()
- result.paths.phpldapadminconfig = "/some/ldapconfig"
- entries = self.report_logger(result)
- self.assertEquals(entries[-1],
- ("INFO", "A phpLDAPadmin configuration file suitable for administering the Samba 4 LDAP server has been created in /some/ldapconfig."))
-
def test_report_logger_adminpass(self):
result = self.base_result()
result.adminpass_generated = True
+++ /dev/null
-<?php
-/**
- * The phpLDAPadmin config file, customised for use with Samba4
- *
- * Use config.php.example to create config.php, if you don't have one.
- *
- * Append this file to config.php.
- */
-
-/* Create a new LDAP server for SAMBA4 */
-$servers->newServer('ldap_pla');
-
-/* A convenient name that will appear in the tree viewer and throughout
- phpLDAPadmin to identify this LDAP server to users. */
-$servers->setValue('server','name','Samba4 LDAP Server');
-$servers->setValue('server','host','${S4_LDAPI_URI}');
-$servers->setValue('login','auth_type','session');
-$servers->setValue('login','attr','dn');
-
-?>