From a0e443600dce2622570bef00eb2ece83c78664e1 Mon Sep 17 00:00:00 2001 From: Vicent Guardiola Date: Tue, 26 Oct 2004 14:08:41 +0000 Subject: Fix net join for winbind Changer order dialog in AD --- perl-install/authentication.pm | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index 06e66c8c9..09f683dc9 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -78,16 +78,18 @@ sub ask_parameters { my $AD_user = $authentication->{AD_user} =~ /(.*)\@\Q$authentication->{AD_domain}\E$/ ? $1 : $authentication->{AD_user}; my $anonymous = $AD_user; + my $anonymous = 'off'; $in->ask_from('', - N("Authentication Active Directory"), - [ { label => N("Domain"), val => \$authentication->{AD_domain} }, + N("Authentication Active Directory")."\n", + [ + { label => N("User allowed to Bind Active Directory"), val => \$AD_user }, + { label => N("Password for user"), val => \$authentication->{AD_password},hidden => 1}, + { label => N("Modify Options"), val => \$anonymous, type => 'bool' }, + { label => "\t".N("Domain"), val => \$authentication->{AD_domain}, disabled => sub { $anonymous } }, #{ label => N("Server"), val => \$authentication->{AD_server} }, - { label => N("Server"), type => 'combo', val => \$authentication->{AD_server}, list => \@srvs , not_edit => 0 }, - { label => N("LDAP users database"), val => \$authentication->{AD_users_db} }, - { label => N("Use Anonymous BIND "), val => \$anonymous, type => 'bool' }, - { label => N("LDAP user allowed to browse the Active Directory"), val => \$AD_user, disabled => sub { $anonymous } }, - { label => N("Password for user"), val => \$authentication->{AD_password}, disabled => sub { $anonymous } }, + { label => "\t".N("Server"), type => 'combo', val => \$authentication->{AD_server}, list => \@srvs , not_edit => 0, disabled => sub { $anonymous } }, + { label => "\t".N("LDAP users database"), val => \$authentication->{AD_users_db}, disabled => sub { $anonymous } }, { label => N("Encryption"), val => \$authentication->{sub_kind}, list => [ map { $_->[0] } group_by2(@sub_kinds) ], format => sub { $sub_kinds{$_[0]} } }, ]) or return; $authentication->{AD_user} = !$AD_user || $authentication->{sub_kind} eq 'anonymous' ? '' : @@ -116,7 +118,7 @@ The command 'wbinfo -t' will test whether your authentication secrets are good." $authentication->{AD_domain} ||= $netc->{DOMAINNAME} if $kind eq 'SMBKRB'; $authentication->{AD_users_idmap} ||= 'ou=idmap,' . domain_to_ldap_domain($authentication->{AD_domain}) if $kind eq 'SMBKRB'; $netc->{WINDOMAIN} ||= $netc->{DOMAINNAME}; - my $anonymous; + my $anonymous = "off"; $in->ask_from('', $kind eq 'SMBKRB' ? N("Authentication Active Directory") : N("Authentication Windows Domain"), [ if_($kind eq 'SMBKRB', @@ -156,14 +158,12 @@ sub set { update_ldap_conf( host => $authentication->{LDAP_server}, base => $domain, - port => 636, - ssl => 'on', - nss_base_shadow => "ou=People,$domain", - nss_base_passwd => "ou=People,$domain", - nss_base_group => "ou=Group,$domain", + nss_base_shadow => $domain."?sub", + nss_base_passwd => $domain."?sub", + nss_base_group => $domain."?sub", ); } elsif ($kind eq 'AD') { - $in->do_pkgs->install(qw(nss_ldap pam_krb5 libsasl2-plug-gssapi)); + $in->do_pkgs->install(qw(nss_ldap )); my $port = "389"; set_nsswitch_priority('ldap'); @@ -256,7 +256,7 @@ sub set { #- defer running smbpassword until the network is up $when_network_is_up->(sub { - run_program::rooted($::prefix, 'net', 'join', '-j', $domain, '-U', $authentication->{winuser} . '%' . $authentication->{winpass}); + run_program::rooted($::prefix, 'net', 'join', $domain, '-U', $authentication->{winuser} . '%' . $authentication->{winpass}); }); } elsif ($kind eq 'SMBKRB') { $authentication->{AD_server} ||= 'ads.' . $authentication->{AD_domain}; @@ -264,7 +264,7 @@ sub set { my $realm = $authentication->{AD_domain}; configure_krb5_for_AD($authentication); - $in->do_pkgs->install('samba-winbind', 'pam_krb5', 'samba-server', 'samba-client'); + $in->do_pkgs->install('samba-winbind', 'samba-server', 'samba-client'); set_nsswitch_priority('winbind'); set_pam_authentication('winbind'); -- cgit v1.2.1