summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-nis-manage
diff options
context:
space:
mode:
Diffstat (limited to 'install/tools/ipa-nis-manage')
-rwxr-xr-xinstall/tools/ipa-nis-manage7
1 files changed, 4 insertions, 3 deletions
diff --git a/install/tools/ipa-nis-manage b/install/tools/ipa-nis-manage
index 1c6de7b57..5ef3ce0e6 100755
--- a/install/tools/ipa-nis-manage
+++ b/install/tools/ipa-nis-manage
@@ -30,6 +30,7 @@ try:
from ipaserver.plugins.ldap2 import ldap2
from ipalib import api, errors
from ipapython.ipa_log_manager import *
+ from ipapython.dn import DN
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the required Python modules. The
@@ -39,8 +40,8 @@ error was:
""" % sys.exc_value
sys.exit(1)
-nis_config_dn = "cn=NIS Server,cn=plugins,cn=config"
-compat_dn = "cn=Schema Compatibility,cn=plugins,cn=config"
+nis_config_dn = DN(('cn', 'NIS Server'), ('cn', 'plugins'), ('cn', 'config'))
+compat_dn = DN(('cn', 'Schema Compatibility'), ('cn', 'plugins'), ('cn', 'config'))
def parse_options():
usage = "%prog [options] <enable|disable>\n"
@@ -120,7 +121,7 @@ def main():
try:
conn = ldap2(shared_instance=False, base_dn='')
conn.connect(
- bind_dn='cn=directory manager', bind_pw=dirman_password
+ bind_dn=DN(('cn', 'directory manager')), bind_pw=dirman_password
)
except errors.ExecutionError, lde:
sys.exit("An error occurred while connecting to the server: %s" % str(lde))