summaryrefslogtreecommitdiffstats
path: root/ldap_wizard/ldap.pm
diff options
context:
space:
mode:
authorVicent Guardiola <vguardiola@mandriva.com>2004-08-04 15:27:26 +0000
committerVicent Guardiola <vguardiola@mandriva.com>2004-08-04 15:27:26 +0000
commit5d9a2612451a6d4049424419b80c6125a986881d (patch)
treeab67d8d1fb98451932fa36b9c57e8e19086566f4 /ldap_wizard/ldap.pm
parentcc0b8ff27f7bce428a52d9eb5e386706e98ae03c (diff)
downloaddrakwizard-5d9a2612451a6d4049424419b80c6125a986881d.tar
drakwizard-5d9a2612451a6d4049424419b80c6125a986881d.tar.gz
drakwizard-5d9a2612451a6d4049424419b80c6125a986881d.tar.bz2
drakwizard-5d9a2612451a6d4049424419b80c6125a986881d.tar.xz
drakwizard-5d9a2612451a6d4049424419b80c6125a986881d.zip
*** empty log message ***
Diffstat (limited to 'ldap_wizard/ldap.pm')
-rw-r--r--ldap_wizard/ldap.pm28
1 files changed, 19 insertions, 9 deletions
diff --git a/ldap_wizard/ldap.pm b/ldap_wizard/ldap.pm
index 57d5b052..9821b69f 100644
--- a/ldap_wizard/ldap.pm
+++ b/ldap_wizard/ldap.pm
@@ -14,6 +14,7 @@ use MDK::Wizard::Varspaceval;
use MDK::Wizard::Wizcommon;
use Expect;
require Net::LDAP;
+use Net::LDAP::Util qw(ldap_error_text);
#unless ($> == 0) {
# die "You are not root Exiting\n";
@@ -96,7 +97,7 @@ $o->{pages} = {
},
post => sub {
if ($o->{var}{wiz_level} == 2) {
- return 'add_userposix';
+ return 'check_conffile';
}
},
data => [
@@ -105,6 +106,16 @@ $o->{pages} = {
],
next => 'set_srv',
},
+ check_conffile => { name => N("Config Server "),
+ data => [
+ { label => N("Server Name: "), val => \$o->{var}{srv} },
+ { label => N("Server RootDN: "), val => \$o->{var}{rootdn} },
+ { label => N("RootDN Password : "), val => \$o->{var}{rootpass}, hidden => 1 },
+ { label => N("Server Suffix: "), val => \$o->{var}{suffix} },
+ { label => N("Server Default Users OU : "), val => \$o->{var}{defou} },
+ ],
+ next => 'add_userposix'
+ },
add_userposix => {
name => N("LDAP User Add") . "\n\n" . N("User Create in : ") . $o->{var}{defou} . "," . $o->{var}{suffix},
data => [
@@ -118,7 +129,7 @@ $o->{pages} = {
next => 'password'
},
password => {
- name => N("LDAP User Password") . "\n\n" . N("Password for Users : ") . $o->{var}{cn} . $o->{var}{defou} . "," . $o->{var}{suffix},
+ name => N("LDAP User Password") . "\n\n" . N("Password for Users : ").$o->{var}{sn}.",".$o->{var}{sn}.",". $o->{var}{cn} . $o->{var}{defou} . "," . $o->{var}{suffix},
data => [
{
label => N("Password:):"), val => \$o->{var}{uidpass}, hidden => 1 },
@@ -178,7 +189,7 @@ $o->{pages} = {
{
label => N("User Name:"), type => 'field', fixed_val => \$o->{var}{uid} },
{
- label => N("User:"), type => 'field', fixed_val => $o->{var}{cn} },
+ label => N("Create in :"), type => 'field', val => $o->{var}{defou}.$o->{var}{suffix} },
],
post => \&do_it_user_add,
next => 'endadd'
@@ -257,11 +268,10 @@ sub do_it_setldap {
# create config file in /etc/sysconfig/ldapconf
output($conf_file, <<EOF);
-server=$o->{var}{srv}
+srv=$o->{var}{srv}
suffix=$o->{var}{suffix}
rootdn=$o->{var}{rootdn}
rootpass=$o->{var}{rootpass}
-rootpass=$o->{var}{rootpass}
users=$o->{var}{defou}
EOF
@@ -296,9 +306,9 @@ description: OU Hosts
objectClass: top
objectClass: organizationalUnit
-dn: ou=People,$o->{var}{suffix}
-ou: People
-description: OU People
+dn: ou=Users,$o->{var}{suffix}
+ou: Users
+description: OU Users
objectClass: top
objectClass: organizationalUnit
@@ -320,7 +330,7 @@ RootLdif
sub do_it_user_add {
return if $::testing;
my $ldap = ldap_connect($o);
- add_user($o);
+ my $mesg = add_user($o);
}
sub new {