summaryrefslogtreecommitdiffstats
path: root/ldap_wizard
diff options
context:
space:
mode:
authorVicent Guardiola <vguardiola@mandriva.com>2004-09-02 05:17:51 +0000
committerVicent Guardiola <vguardiola@mandriva.com>2004-09-02 05:17:51 +0000
commit9d5741364244931c106d41f6c63976689685c2c8 (patch)
tree58e8efa73574db812bfcd3a0bceb8738e32b3bef /ldap_wizard
parentc6f8cca5a3ea379561ba94f3e414bb21313af130 (diff)
downloaddrakwizard-9d5741364244931c106d41f6c63976689685c2c8.tar
drakwizard-9d5741364244931c106d41f6c63976689685c2c8.tar.gz
drakwizard-9d5741364244931c106d41f6c63976689685c2c8.tar.bz2
drakwizard-9d5741364244931c106d41f6c63976689685c2c8.tar.xz
drakwizard-9d5741364244931c106d41f6c63976689685c2c8.zip
Add new step ask_menu just after welcome
Add Ldap descritption in welcome step Modify description and label when you create server_
Diffstat (limited to 'ldap_wizard')
-rw-r--r--ldap_wizard/Ldap.pm60
1 files changed, 36 insertions, 24 deletions
diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm
index 160fe253..6e0995b7 100644
--- a/ldap_wizard/Ldap.pm
+++ b/ldap_wizard/Ldap.pm
@@ -23,7 +23,7 @@ use Net::LDAP::Util qw(ldap_error_text);
#}
my $o = {
- name => N("Configure OpenLDAP Server "),
+ name => N("Ldap wizard "),
var => {
defou => 'ou=Users',
srv => 'localhost',
@@ -78,21 +78,28 @@ if (-f $conf_file) {
}
my %level = (
- 1 => N("Configure OpenLDAP server"),
- 2 => N("Add user in OpenLDAP server"),
- 3 => N("Delete OpenLDAP configuration"),
+ 1 => N("Configure Ldap server"),
+ 2 => N("Add user in Ldap server"),
+ 3 => N("Delete Ldap configuration"),
);
$o->{pages} = {
welcome => {
- name => N("OpenLDAP configuration wizard") . "\n\n" . N("Setup an OpenLDAP server."),
- no_back => 1,
+ name => N("Ldap configuration wizard") . "\n\n" . N("LDAP stands for Lightweight Directory Access Protocol.") . "\n\n" . N("It is a lightweight protocol for accessing directory services, specifically X.500-based directory services."),
+ no_back => 1,
+ next => 'ask_menu'
+ },
+
+ ask_menu => {
+ name => N("Ldap configuration wizard"),
+ no_back => 1,
+
pre => sub {
$o->{var}{wiz_level} ||= 1;
},
post => sub {
if ($o->{var}{wiz_level} == 2) {
- ! -f $conf_file and $::in->ask_warn(N("Error"), N("You must setup an OpenLDAP server first.")) and return 'set_srv';
+ ! -f $conf_file and $::in->ask_warn(N("Error"), N("You must setup an Ldap server first.")) and return 'set_srv';
return 'add_userposix';
}
@@ -101,6 +108,7 @@ $o->{pages} = {
-f $conf_file and return 'resume';
}
if ($o->{var}{wiz_level} == 3) {
+ ! -f $conf_file and $::in->ask_warn(N("Error"), N("You must setup an Ldap server first.")) and return 'set_srv';
return 'del_conf';
}
},
@@ -158,16 +166,17 @@ $o->{pages} = {
next => 'summary_add_user'
},
set_srv => {
- name => N("Configuring LDAP Server"),
+ name => N("Configuring LDAP Server") ."\n\n" . N("LDAP directory tree ") . "\n" . N("The DNS naming is used for LDAP directory tree definition") . "\n" . N("ex: Domain mandrakesoft.com dc=mandrakesoft,dc=com") . "\n\n" . N("LDAP Administrator ") . "\n" . N("Administrator is a power user with grant access on LDAP database") . "\n",
data => [
- { label => N("LDAP Suffix:\n ex: dc=example,dc=com\n"), val => \$o->{var}{suffix}, help => "aide p" },
- { label => N("LDAP Administrator:\n ex: cn=admin,dc=example,dc=com\n"), val => \$o->{var}{rootdn}, help => "aide p" },
+ { label => N(" ") },
+ { label => N("LDAP directory tree:"), val => \$o->{var}{suffix}, help => "aide p" },
+ { label => N("LDAP Administrator:"), val => \$o->{var}{rootdn}, help => "aide p" },
{ label => N("LDAP Password:"), hidden => 1, val => \$o->{var}{rootpass}, help => "aide p" },
{ label => N("LDAP Password (again):"), hidden => 1, val => \$o->{var}{rootpass2}, help => "aide p" },
],
complete => sub {
if (!$o->{var}{suffix} || $o->{var}{suffix} !~ /dc/) {
- $::in->ask_warn(N("Error"), N("You must enter a suffix for LDAP."));
+ $::in->ask_warn(N("Error"), N("You must enter a valid LDAP directory tree ."));
return 1;
}
if (!$o->{var}{rootpass}) {
@@ -185,10 +194,11 @@ $o->{pages} = {
summary_add_user => {
name => N("Confirmation of the user to create"),
data => [
- { label => N("Name:"), type => 'field', fixed_val => \$o->{var}{sn} },
- { label => N("First name:"), type => 'field', fixed_val => \$o->{var}{cn} },
- { label => N("User Name:"), type => 'field', fixed_val => \$o->{var}{uid} },
- { label => N("Create in:"), type => 'field', fixed_val => \$o->{var}{defou} }, #. \$o->{var}{suffix} },
+ { label => N(" ") },
+ { label => N("Name:"), type => 'field', fixed_val => \$o->{var}{sn} },
+ { label => N("First name:"), type => 'field', fixed_val => \$o->{var}{cn} },
+ { label => N("User Name:"), type => 'field', fixed_val => \$o->{var}{uid} },
+ { label => N("Create in:"), type => 'field', fixed_val => \$o->{var}{defou} }, #. \$o->{var}{suffix} },
],
post => \&do_it_user_add,
next => $o->{var}{useraddisnogood}
@@ -196,9 +206,9 @@ $o->{pages} = {
summary_set_srv => {
name => N("Confirmation Information for create an LDAP server"),
data => [
- { label => N("Organisation LDAP:"), type => 'field', fixed_val => \$o->{var}{suffix} },
- { label => N("Administrator LDAP:"), type => 'field', fixed_val => \$o->{var}{rootdn} },
- { label => "", type => 'field', fixed_val => \$o->{var}{suffix} },
+ { label => N(" ") },
+ { label => N("LDAP directory tree:"), type => 'field', fixed_val => \$o->{var}{suffix} },
+ { label => N("LDAP Administrator:"), type => 'field', fixed_val => \$o->{var}{rootdn} },
{ label => N("Users Container:"), type => 'field', fixed_val => \$o->{var}{defou} },
],
post => \&do_it_setldap,
@@ -206,7 +216,9 @@ $o->{pages} = {
},
end => {
name => N("Congratulations"),
- data => [ { label => N("The wizard successfully configured the LDAP.") } ],
+ data => [
+ { label => N(" ") },
+ { label => N("The wizard successfully configured the LDAP.") } ],
no_back => 1,
end => 1,
next => 0
@@ -232,13 +244,13 @@ $o->{pages} = {
resume => {
- name => N("Server already configured"),
+ name => N("Server already configured") . "\n\n" . N("You have already configured your Ldap Server") ,
post => sub {
my $container_ou = $o->{var}{wiz_level}.",".$o->{var}{suffix};
},
- data => [ { label => N("You have already configured your OpenLDAP Server with drakwizard\n") } ,
- { label => N("Organisation LDAP:"), type => 'field', fixed_val => \$o->{var}{suffix} },
- { label => N("Administrator LDAP:"), type => 'field', fixed_val => \$o->{var}{rootdn} },
+ data => [ { label => N(" ") } ,
+ { label => N("LDAP directory tree::"), type => 'field', fixed_val => \$o->{var}{suffix} },
+ { label => N("LDAP Administrator:"), type => 'field', fixed_val => \$o->{var}{rootdn} },
{ label => N("Users Container:"), type => 'field', fixed_val => \$o->{var}{defou} },
],
next => 'welcome',
@@ -370,7 +382,7 @@ sub sav_conf {
system($cmd) == 0 or !$::testing and err_dialog(N("Error!"), N("%s Failed", $cmd));
system("cp /etc/openldap/slapd.conf /root/slapd.save");
system("rm /etc/sysconfig/ldapwiz");
- system("rm -fr /var/lib/ldap/*")
+ system("rm -fr /var/lib/ldap/*");
}
sub new {