From c1d9bc6652b358fd4a1b3909f15e2aa0398af41e Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Wed, 24 Feb 2010 16:16:31 +0000 Subject: drakauth: do not show bogus error message when using LDAP auth (#57800) --- perl-install/NEWS | 2 ++ perl-install/authentication.pm | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index 2d81b3495..019b09e4f 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- drakauth: do not show bogus error message when using LDAP auth (#57800) + Version 11.71.11 - 11 February 2010 - run_program: set XAUTHORITY and HOME for the user we will drop diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index d009bc8b0..f5c970b16 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -101,6 +101,9 @@ sub ask_parameters { #$authentication->{nssgrp} = "0"; $authentication->{ccreds} = 1; + # this package must be installed for 'Fetch DN' button to actually work + $in->do_pkgs->ensure_are_installed([ 'openldap-clients' ], 1) or return; + $in->ask_from('', N(" "), [ { label => N("Welcome to the Authentication Wizard"), title => 1 }, {}, @@ -351,6 +354,10 @@ server=$authentication->{LDAP_server} realm=$authentication->{LDAPDOMAIN} EOF + if ($authentication->{ccreds}) { + run_program::rooted($::prefix, '/usr/sbin/nss_updatedb.cron'); # updates offline cache. + } + } elsif ($kind eq 'KRB5') { configure_krb5_for_AD($authentication); @@ -612,7 +619,7 @@ sub set_pam_authentication { sub set_nsswitch_priority { #my (@kinds) = @_; my ($kinds, $connected) = @_; - my @known = qw(nis ldap winbind); + my @known = qw(nis ldap winbind compat); substInFile { if (my ($database, $l) = /^(\s*(?:passwd|shadow|group|automount):\s*)(.*)/) { my @l = difference2([ split(' ', $l) ], \@known); @@ -913,7 +920,6 @@ sub get_server_for_domain { sub fetch_dn { my ($srv) = @_; - #print "$srv"; my $s = run_program::rooted_get_stdout($::prefix, 'ldapsearch', '-x', '-h', $srv, '-b', '', '-s', 'base', '+'); $authentication->{LDAPDOMAIN} = first($s =~ /namingContexts: (.+)/); return $authentication->{LDAPDOMAIN}; -- cgit v1.2.1