diff options
Diffstat (limited to 'ldap_wizard')
-rw-r--r-- | ldap_wizard/Ldap.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm index 652feb9e..19d7d5f4 100644 --- a/ldap_wizard/Ldap.pm +++ b/ldap_wizard/Ldap.pm @@ -54,6 +54,9 @@ 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/[^,]*,//; @@ -88,6 +91,10 @@ $o->{pages} = { welcome => { 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, + post => sub { + ! -f $conf_file and 'set_srv'; + }, + next => 'ask_menu' }, @@ -115,6 +122,7 @@ $o->{pages} = { }, data => [ + { label => N(" ") }, { label => N("Your choice:") . "\n\n", val => \$o->{var}{wiz_level}, type => 'list', list => [ keys %level ], format => sub { $level{$_[0]} } }, ], next => 'set_srv', @@ -171,14 +179,17 @@ $o->{pages} = { next => 'summary_add_user' }, set_srv => { - 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", + name => "\n". N("Configuring LDAP Server") ."\n\n" . N("LDAP directory tree ") . "\n" . N("The DNS naming is used for LDAP directory tree definition") . "\n" . N("Domain name : ") . $wiz_domain_name . "\n" . ("LDAP Diretory Tree: " . $o->{var}{suffix} ) . "\n\n" . N("LDAP Administrator ") . "\n" . N("Administrator is a power user with grant access on LDAP database") . "\n" . "cn=".N("Adrministrator").",".$o->{var}{suffix} . "\n\n", data => [ { 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 Administrator:"), val => \$o->{var}{administrator}, 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" }, ], + pre => sub { + $o->{var}{administrator} = "cn=".N("Adrministrator").",".$o->{var}{suffix}; + }, complete => sub { if (!$o->{var}{suffix} || $o->{var}{suffix} !~ /dc/) { $::in->ask_warn(N("Error"), N("You must enter a valid LDAP directory tree .")); |