replica-prepare: anonymous binds may be disallowed

Fixes: https://fedorahosted.org/freeipa/ticket/1900
This commit is contained in:
Simo Sorce
2011-10-06 08:37:17 +02:00
committed by Martin Kosek
parent 185ca8f6fc
commit 652d315b3e
4 changed files with 48 additions and 32 deletions

View File

@@ -328,7 +328,8 @@ def del_master(realm, hostname, options):
# 5. And clean up the removed replica DNS entries if any.
try:
if bindinstance.dns_container_exists(options.host, thisrepl.suffix):
if bindinstance.dns_container_exists(options.host, thisrepl.suffix,
dm_password=options.dirman_passwd):
if options.dirman_passwd:
api.Backend.ldap2.connect(bind_dn='cn=Directory Manager',
bind_pw=options.dirman_passwd)