diff options
Diffstat (limited to 'ldap_wizard')
-rw-r--r-- | ldap_wizard/Ldap.pm | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm index 52db1766..d3604ebd 100644 --- a/ldap_wizard/Ldap.pm +++ b/ldap_wizard/Ldap.pm @@ -93,10 +93,11 @@ $o->{pages} = { } if ($o->{var}{wiz_level} == 1) { - ! -f $conf_file and $::in->ask_yesorno(N("Information "), N("would you like save an existing OpenLDAP configuration ?")) and return 'sav_old_conf'; + ! -f $conf_file and $::in->ask_yesorno(N("Information "), N("Would you like save an existing OpenLDAP configuration ?")) and return 'sav_old_conf'; return 'set_srv'; } }, + data => [ { label => N("Your choice:") . "\n\n", val => \$o->{var}{wiz_level}, type => 'list', list => [ keys %level ], format => sub { $level{$_[0]} } }, ], @@ -183,21 +184,8 @@ $o->{pages} = { { label => N("Create in:"), type => 'field', fixed_val => \$o->{var}{defou} }, #. \$o->{var}{suffix} }, ], post => \&do_it_user_add, - next => 'addnext' + next => 'endadd' }, - - addnext => { - name => N("test"), - data => [ - { label => N("OP:"), type => 'field', fixed_val => \$o->{var}{suffix} }, - { label => N("AP:"), type => 'field', fixed_val => \$o->{var}{rootdn} }, - { label => N("Add Kerberos"), type => 'field', fixed_val => \$o->{var}{suffix} }, - ], - post => \&do_it_modif, - next => 'end' - }, - - summary_set_srv => { name => N("Confirmation Information for create LDAP server"), data => [ @@ -294,12 +282,14 @@ sub init_ldap { $o->{var}{rootdn} =~ /cn=(\w+),/ and my $cnadmin = $1; -print "$o->{var}{rootdn}\n"; -print "$o->{var}{rootpass}\n"; - my $LDAP; - open($LDAP, "| ldapadd -x -h $o->{var}{srv} -D '$o->{var}{rootdn}' -w $o->{var}{rootpass}"); + print "$o->{var}{rootdn}\n"; + print "$o->{var}{rootpass}\n"; + print "$o->{var}{srv}\n"; + + my $LDAP; + open($LDAP, "| ldapadd -x -D '$o->{var}{rootdn}' -w $o->{var}{rootpass}"); - print $LDAP <<RootLdif; + print $LDAP <<RootLdif; dn: $o->{var}{suffix} dc: $ldap_dc objectClass: dcObject @@ -332,6 +322,7 @@ objectClass: organizationalUnit RootLdif close($LDAP) + } sub do_it_user_add { |