source: trunk/puppet/manifests/classes/ldap-auth-client.pp @ 228

Last change on this file since 228 was 169, checked in by sebas, 15 years ago

crear el home del usario si no esta presente

File size: 2.0 KB
Line 
1class matrix::ldapauthclient {
2        package { "ldap-auth-client": ensure => installed }
3
4        line { nsswitch_passwd_compact_off:
5        file => "/etc/nsswitch.conf",
6        line => 'passwd:         compat',
7        ensure => absent,
8        require => Package["ldap-auth-client"]
9        }
10        line { nsswitch_passwd_ldap_on:
11        file => "/etc/nsswitch.conf",
12        line => 'passwd:         files ldap',
13        ensure => present,
14        require => Package["ldap-auth-client"]
15        }
16
17        line { nsswitch_group_compact_off:
18        file => "/etc/nsswitch.conf",
19        line => 'group:          compat',
20        ensure => absent,
21        require => Package["ldap-auth-client"]
22        }
23        line { nsswitch_group_ldap_on:
24        file => "/etc/nsswitch.conf",
25        line => 'group:         files ldap',
26        ensure => present,
27        require => Package["ldap-auth-client"]
28        }
29
30        file { "/etc/pam.d/common-account":
31        content => "account sufficient      pam_ldap.so\naccount required        pam_unix.so\n",
32        ensure => present,
33        require => Package["ldap-auth-client"]
34        }
35
36        file { "/etc/pam.d/common-auth":
37        content => "auth    required        pam_group.so use_first_pass\nauth    sufficient      pam_ldap.so\nauth    required        pam_unix.so nullok_secure use_first_pass\n",
38        ensure => present,
39        require => Package["ldap-auth-client"]
40        }
41
42        file { "/etc/pam.d/common-password":
43        content => "password sufficient      pam_ldap.so\npassword required        pam_unix.so nullok obscure min=4 max=8 md5\n",
44        ensure => present,
45        require => Package["ldap-auth-client"]
46        }
47
48        file { "/etc/pam.d/common-session":
49        content => "session required        pam_unix.so\nsession required        pam_mkhomedir.so skel=/etc/skel/\nsession optional        pam_ldap.so\nsession optional        pam_foreground.so\n",
50        ensure => present,
51        require => Package["ldap-auth-client"]
52        }
53}
Note: See TracBrowser for help on using the repository browser.