From d9d59b7951e15b75b35405db4746b0a6388d5741 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Mon, 11 Apr 2005 15:55:44 +0000 Subject: fix passwd pb --- ldap_wizard/Ldap.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ldap_wizard') diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm index 8d9d8742..385d7fb0 100644 --- a/ldap_wizard/Ldap.pm +++ b/ldap_wizard/Ldap.pm @@ -60,10 +60,6 @@ my $o = { } }; -my $wiz = new MDK::Wizard::Wizcommon; -my $wiz_domain_name = $wiz->{net}->network_get("DOMAINNAME"); -my $wiz_host_name = $wiz->{net}->network_get("HOSTNAME"); - my $ldap_suffix=join(',dc=', split(/\./, chomp_(`hostname -f`))); $ldap_suffix =~ s/[^,]*,//; my $conf_file = "/etc/sysconfig/ldapwiz"; @@ -168,10 +164,13 @@ $o->{pages} = { complete => sub { if (!$o->{var}{uidpass}) { $::in->ask_warn(N("Error"), N("You must enter a password for LDAP.")); + $o->{var}{uidpass} = ""; return 1; } if ($o->{var}{uidpass} ne $o->{var}{uidpass2}) { $::in->ask_warn(N("Error"), N("The passwords do not match")); + $o->{var}{uidpass} = ""; + $o->{var}{uidpass2} = ""; return 1; } }, @@ -189,7 +188,7 @@ $o->{pages} = { pre => sub { $o->{var}{rootdn} = "cn=" . N("Administrator,%s", $o->{var}{suffix}); my $_cryptpass = crypt($o->{var}{rootpass}, "crypt"); - $o->{var}{rootpass} = $_cryptpass; +# $o->{var}{rootpass} = $_cryptpass; }, complete => sub { if (!$o->{var}{suffix} || $o->{var}{suffix} !~ /dc/) { @@ -198,10 +197,13 @@ $o->{pages} = { } if (!$o->{var}{rootpass}) { $::in->ask_warn(N("Error"), N("You must enter a password for LDAP.")); + $o->{var}{rootpass} = ""; return 1; } if ($o->{var}{rootpass} ne $o->{var}{rootpass2}) { $::in->ask_warn(N("Error"), N("The passwords do not match")); + $o->{var}{rootpass} = ""; + $o->{var}{rootpass2} = ""; return 1; } #$o->{var}{rootdn} = "cn=".$rootdn_cn.$o->{var}{suffix}, -- cgit v1.2.1