summaryrefslogtreecommitdiffstats
path: root/ldap_wizard
diff options
context:
space:
mode:
authorVicent Guardiola <vguardiola@mandriva.com>2004-08-10 14:19:21 +0000
committerVicent Guardiola <vguardiola@mandriva.com>2004-08-10 14:19:21 +0000
commite80991974645e1cb325ec89c4db5d7c003e5e292 (patch)
tree047a7413ee7e990007a4aefa08ec83d46e808150 /ldap_wizard
parenta7c2a805a5d52cb73efcd9b829bf7684a898be52 (diff)
downloaddrakwizard-e80991974645e1cb325ec89c4db5d7c003e5e292.tar
drakwizard-e80991974645e1cb325ec89c4db5d7c003e5e292.tar.gz
drakwizard-e80991974645e1cb325ec89c4db5d7c003e5e292.tar.bz2
drakwizard-e80991974645e1cb325ec89c4db5d7c003e5e292.tar.xz
drakwizard-e80991974645e1cb325ec89c4db5d7c003e5e292.zip
Remove label in summary_set_srv
Diffstat (limited to 'ldap_wizard')
-rw-r--r--ldap_wizard/Ldap.pm21
1 files changed, 9 insertions, 12 deletions
diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm
index cf5b8b06..6a3bd768 100644
--- a/ldap_wizard/Ldap.pm
+++ b/ldap_wizard/Ldap.pm
@@ -47,8 +47,6 @@ my $o = {
nom => '',
prenom => '',
},
- needed_rpm => [ 'openldap-server' ],
- defaultimage => "/usr/share/wizards/proxy_wizard/images/proxy.png"
};
@@ -57,7 +55,7 @@ my $ldap_suffix=join(',dc=', split(/\./, chomp_(`hostname -f`)));
$ldap_suffix =~ s/[^,]*,//;
my $conf_file = "/etc/sysconfig/ldapconf";
my $LDAPCONF = "/etc/openldap/slapd.conf";
-
+my $rootdn_cn = "Admin";
##### Read conf file is exist
my $hostname = `hostname`;
@@ -67,7 +65,6 @@ if (-f $conf_file) {
my %conf = getVarsFromSh($conf_file);
$o->{var}{suffix} = $conf{suffix};
$o->{var}{rootdn} = $conf{rootdn};
- $o->{var}{rootpass} = $conf{rootpass};
$o->{var}{srv} = $conf{srv};
$o->{var}{defou} = $conf{users};
} else {
@@ -144,11 +141,12 @@ $o->{pages} = {
name => N("Configuring LDAP Server"),
data => [
{ label => N("LDAP Suffix:\n ex: dc=example,dc=com\n"), val => \$o->{var}{suffix}, help => N("aide p") },
- { label => N("LDAP Administrator:\n ex: cn=root,dc=example,dc=com"), val => \$o->{var}{rootdn}, help => N("aide p") },
+ { label => N("LDAP Administrator:\n "), val => \$o->{var}{rootdn}, help => N("aide p") },
{ label => N("LDAP Password:"), hidden => 1, val => \$o->{var}{rootpass}, help => N("aide p") },
{ label => N("LDAP Password (again):"), hidden => 1, val => \$o->{var}{rootpass2}, help => N("aide p") },
],
complete => sub {
+
if (!$o->{var}{suffix}) {
$::in->ask_warn(N("Error"), N("You must enter a suffix for LDAP."));
return 1;
@@ -161,8 +159,9 @@ $o->{pages} = {
$::in->ask_warn(N("Error"), N("The passwords do not match"));
return 1;
}
+ #$o->{var}{rootdn} = "cn=".$rootdn_cn.$o->{var}{suffix},
},
- next => 'summary_set_srv',
+ next => 'summary_set_srv'
},
summary_add_user => {
name => N("Confirmation of the user to create"),
@@ -181,10 +180,7 @@ $o->{pages} = {
{ label => N("Organisation LDAP:"), type => 'field', fixed_val => \$o->{var}{suffix} },
{ label => N("Administrator LDAP:"), type => 'field', fixed_val => \$o->{var}{rootdn} },
# { label => N("Arbo LDAP:"), type => 'field', fixed_val => " " },
- { label => N(""), type => 'field', fixed_val => $o->{var}{suffix} },
- { label => N(""), type => 'field', fixed_val => " ou=hosts" },
- { label => N(""), type => 'field', fixed_val => " ou=groups" },
- { label => N(""), type => 'field', fixed_val => " ou=users" },
+ { label => N(""), type => 'field', fixed_val => \$o->{var}{suffix} },
],
post => \&do_it_setldap,
next => 'end'
@@ -206,6 +202,7 @@ $o->{pages} = {
};
sub do_it_setldap {
+
return if $::testing;
if (!-f $LDAPCONF) {
die "no $LDAPCONF found";
@@ -242,11 +239,11 @@ sub do_it_setldap {
my $cryptpass = crypt($o->{var}{rootpass}, "crypt");
if (any { /^rootpw/ } cat_($LDAPCONF)) {
substInFile {
- #s/rootpw.*/rootpw $cryptpass/;
+ #s/rootpw.*/rootpw $cryptpass/;
s/rootpw.*/rootpw $o->{var}{rootpass}/;
} $LDAPCONF;
} else {
- #append_to_file($LDAPCONF, "rootpw {CRYPT}$cryptpass");
+ #append_to_file($LDAPCONF, "rootpw {CRYPT}$cryptpass");
append_to_file($LDAPCONF, "rootpw $o->{var}{rootpass}");
}