summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimotheus Pokorra <tp@tbits.net>2015-04-20 10:00:57 +0200
committerTimotheus Pokorra <tp@tbits.net>2015-04-20 10:02:24 +0200
commitd046fbc0b96e88e8db30e37aa590aa155731102e (patch)
treee29f22118505dc2fc306c7b0df5121cdcabc6793
parent6000d8c21a6095e084fdff3eac0fc4e77af8a593 (diff)
downloadpykolab-d046fbc0b96e88e8db30e37aa590aa155731102e.tar.gz
implementing --directory-manager-pwd for setup-kolab to specify the Directory Manager password (#2645)
-rw-r--r--pykolab/setup/setup_ldap.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index c805d20..4dd69f5 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -84,6 +84,14 @@ def cli_options():
help = _("Setup configuration for Active Directory compatibility.")
)
+ ldap_group.add_option(
+ "--directory-manager-pwd",
+ dest = "directory_manager_pwd",
+ action = "store",
+ default = None,
+ help = _("Specify password for the Domain Manager.")
+ )
+
def description():
return _("Setup LDAP.")
@@ -165,7 +173,10 @@ def execute(*args, **kw):
confirm=True
)
- print >> sys.stderr, utils.multiline_message(
+ if conf.directory_manager_pwd is not None:
+ _input['dirmgr_pass'] = conf.directory_manager_pwd
+ else:
+ print >> sys.stderr, utils.multiline_message(
_("""
Please supply a password for the LDAP Directory Manager
user, which is the administrator user you will be using
@@ -174,7 +185,7 @@ def execute(*args, **kw):
""")
)
- _input['dirmgr_pass'] = utils.ask_question(
+ _input['dirmgr_pass'] = utils.ask_question(
_("Directory Manager password"),
default=utils.generate_password(),
password=True,