1 |
class pam::base { |
2 |
include pam::multiple_ldap_access |
3 |
package { ['pam_ldap','nss_ldap','nscd']: } |
4 |
|
5 |
service { 'nscd': |
6 |
require => Package['nscd'], |
7 |
} |
8 |
|
9 |
file { |
10 |
'/etc/pam.d/system-auth': |
11 |
content => template('pam/system-auth'); |
12 |
'/etc/nsswitch.conf': |
13 |
content => template('pam/nsswitch.conf'); |
14 |
'/etc/ldap.conf': |
15 |
content => template('pam/ldap.conf'); |
16 |
'/etc/openldap/ldap.conf': |
17 |
content => template('pam/openldap.ldap.conf'); |
18 |
} |
19 |
|
20 |
$ldap_password = extlookup("${::fqdn}_ldap_password",'x') |
21 |
file { '/etc/ldap.secret': |
22 |
mode => '0600', |
23 |
content => $ldap_password |
24 |
} |
25 |
} |