aboutsummaryrefslogtreecommitdiffstats
path: root/modules/pam/manifests/base.pp
blob: cfeff23dd7c58d328ef00dcb2a23892710ea096b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class pam::base {
    include pam::multiple_ldap_access
    package { ['nscd']: }

    if versioncmp($::lsbdistrelease, '2') < 0 {
        package { ['pam_ldap','nss_ldap']: }
    } else {
        package { ['nss-pam-ldapd']: }
    }

    service { 'nscd':
        require => Package['nscd'],
    }

    file {
        '/etc/pam.d/system-auth':
            content => template('pam/system-auth');
        '/etc/nsswitch.conf':
            content => template('pam/nsswitch.conf');
        '/etc/ldap.conf':
            content => template('pam/ldap.conf');
        '/etc/openldap/ldap.conf':
            content => template('pam/openldap.ldap.conf');
    }

    $ldap_password = extlookup("${::fqdn}_ldap_password",'x')
    file { '/etc/ldap.secret':
        mode    => '0600',
        content => $ldap_password
    }
}