diff options
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r-- | perl-install/authentication.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index 783fadac7..42ffd3b84 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -144,6 +144,8 @@ sub set { log::l("authentication::set $kind"); + sshd_config_UsePAM($kind ne 'local'); + if ($kind eq 'LDAP') { $in->do_pkgs->install(qw(openldap-clients nss_ldap pam_ldap autofs)); @@ -528,6 +530,18 @@ sub krb5_conf_update { } +sub sshd_config_UsePAM { + my ($UsePAM) = @_; + my $sshd = "$::prefix/etc/ssh/sshd_config"; + -e $sshd or return; + + my $val = "UsePAM " . bool2yesno($UsePAM); + substInFile { + $val = '' if s/^#?UsePAM.*/$val/; + $_ .= "$val\n" if eof && $val; + } $sshd; +} + sub query_srv_names { my ($domain) = @_; |