From c373ed5c5ccbee64c956a9a682a1427387498d8d Mon Sep 17 00:00:00 2001 From: Karl MacMillan Date: Wed, 21 Nov 2007 18:01:32 -0500 Subject: Initial replication setup. This add replication setup through two new commands: ipa-replica-prepare and ipa-replica-install. The procedure is to run ipa-replica-prepare on an existing master. This will collect information about the realm and the current master and create a file storing all of the information. After copying that file to the new replica, ipa-replica-install is run (with -r to create a read-only replica). This version of the patch also includes fixes for the sasl mappings on the replicas. Remaining features: - ssl for replication. - automatic configuration of mesh topology for master (or a simpler way to replicate multiple masters. - tool for view / configuring current replication. --- ipa-python/ipautil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipa-python/ipautil.py') diff --git a/ipa-python/ipautil.py b/ipa-python/ipautil.py index e7f59419..cd8eac16 100644 --- a/ipa-python/ipautil.py +++ b/ipa-python/ipautil.py @@ -25,6 +25,7 @@ import logging import subprocess import os import stat +import socket from string import lower import re @@ -36,7 +37,6 @@ def realm_to_suffix(realm_name): terms = ["dc=" + x.lower() for x in s] return ",".join(terms) - def template_str(txt, vars): return string.Template(txt).substitute(vars) -- cgit From 67cddce4d47791ad357ed5551ab58e16dbf87e0c Mon Sep 17 00:00:00 2001 From: Karl MacMillan Date: Wed, 21 Nov 2007 18:09:24 -0500 Subject: Generate master password from Simo. --- ipa-python/ipautil.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ipa-python/ipautil.py') diff --git a/ipa-python/ipautil.py b/ipa-python/ipautil.py index cd8eac16..df923188 100644 --- a/ipa-python/ipautil.py +++ b/ipa-python/ipautil.py @@ -23,6 +23,8 @@ import string import tempfile import logging import subprocess +from random import Random +from time import gmtime import os import stat import socket @@ -331,3 +333,13 @@ def parse_generalized_time(timestr): except ValueError: return None + +def ipa_generate_password(): + rndpwd = '' + r = Random() + r.seed(gmtime()) + for x in range(12): +# rndpwd += chr(r.randint(32,126)) + rndpwd += chr(r.randint(65,90)) #stricter set for testing + return rndpwd + -- cgit