diff options
-rw-r--r-- | ldap_wizard/ldap.pm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ldap_wizard/ldap.pm b/ldap_wizard/ldap.pm index fffe3427..e3e11533 100644 --- a/ldap_wizard/ldap.pm +++ b/ldap_wizard/ldap.pm @@ -3,7 +3,7 @@ # GPL like # aginies@mandrakesoft.com -package MDK::Wizard::Ldap; +package MDK::Wizard::ldap; use lib qw(/usr/lib/libDrakX); use ugtk2; use strict; @@ -55,7 +55,7 @@ my $o = { -my $ldap_suffix=join(',dc=', split(/\./, `hostname -f`)); +my $ldap_suffix=join(',dc=', split(/\./, chomp_(`hostname -f`))); $ldap_suffix =~ s/[^,]*,//; my $conf_file = "/etc/sysconfig/ldapconf"; my $LDAPCONF = "/etc/openldap/slapd.conf"; @@ -75,11 +75,9 @@ if (-f $conf_file) { $o->{var}{defou} = $conf{users}; } else { - - my $hostname = `hostname`; - $o->{var}{srv} = $hostname; - $o->{var}{suffix} = $ldap_suffix; - + my $hostname = chomp_(`hostname`); + $o->{var}{srv} = $hostname; + $o->{var}{suffix} = $ldap_suffix; } @@ -129,7 +127,7 @@ $o->{pages} = { next => 'password' }, password => { - 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}, + 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 }, |