diff options
author | Jan Cholasta <jcholast@redhat.com> | 2013-08-27 16:06:24 +0000 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-08-28 10:20:41 +0200 |
commit | fc8f0ae3addffcc84f38f363517541ca194011f9 (patch) | |
tree | 7012c047061f83ed9941e02548bde93bd4cc4f9d | |
parent | 5a8e326aebe8c25f5a82e95baf762dfc95f244d9 (diff) | |
download | freeipa-fc8f0ae3addffcc84f38f363517541ca194011f9.tar.gz freeipa-fc8f0ae3addffcc84f38f363517541ca194011f9.tar.xz freeipa-fc8f0ae3addffcc84f38f363517541ca194011f9.zip |
Add --dirman-password option to ipa-server-certinstall.
https://fedorahosted.org/freeipa/ticket/3869
-rw-r--r-- | install/tools/man/ipa-server-certinstall.1 | 3 | ||||
-rw-r--r-- | ipaserver/install/ipa_server_certinstall.py | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/install/tools/man/ipa-server-certinstall.1 b/install/tools/man/ipa-server-certinstall.1 index 0ff3aa3e2..f428402da 100644 --- a/install/tools/man/ipa-server-certinstall.1 +++ b/install/tools/man/ipa-server-certinstall.1 @@ -39,6 +39,9 @@ Install the certificate in the Apache Web Server .TP \fB\-\-pin\fR=\fIPIN\fR The password of the PKCS#12 file +.TP +\fB\-\-dirman\-password\fR=\fIDIRMAN_PASSWORD\fR +Directory Manager password .SH "EXIT STATUS" 0 if the installation was successful diff --git a/ipaserver/install/ipa_server_certinstall.py b/ipaserver/install/ipa_server_certinstall.py index bda054bfb..24770c404 100644 --- a/ipaserver/install/ipa_server_certinstall.py +++ b/ipaserver/install/ipa_server_certinstall.py @@ -61,6 +61,10 @@ class ServerCertInstall(admintool.AdminTool): "--dirsrv_pin", "--http_pin", dest="pin", help=optparse.SUPPRESS_HELP) + parser.add_option( + "-p", "--dirman-password", + dest="dirman_password", + help="Directory Manager password") def validate_options(self): super(ServerCertInstall, self).validate_options(needs_root=True) @@ -76,10 +80,10 @@ class ServerCertInstall(admintool.AdminTool): def ask_for_options(self): super(ServerCertInstall, self).ask_for_options() - if self.options.dirsrv: - self.dm_password = installutils.read_password( + if self.options.dirsrv and not self.options.dirman_password: + self.options.dirman_password = installutils.read_password( "Directory Manager", confirm=False, validate=False, retry=False) - if self.dm_password is None: + if self.options.dirman_password is None: raise admintool.ScriptError( "Directory Manager password required") @@ -108,7 +112,7 @@ class ServerCertInstall(admintool.AdminTool): conn = ldap2(shared_instance=False, base_dn='') conn.connect(bind_dn=DN(('cn', 'directory manager')), - bind_pw=self.dm_password) + bind_pw=self.options.dirman_password) entry = conn.get_entry(DN(('cn', 'RSA'), ('cn', 'encryption'), ('cn', 'config')), |