1 |
class pam { |
2 |
|
3 |
class base { |
4 |
package { ["pam_ldap","nss_ldap", "pam_mkhomedir"]: |
5 |
ensure => installed, |
6 |
} |
7 |
|
8 |
file { "system-auth": |
9 |
path => "/etc/pam.d/system-auth", |
10 |
owner => root, |
11 |
group => root, |
12 |
mode => 644, |
13 |
content => template("pam/system-auth") |
14 |
} |
15 |
|
16 |
file { "nsswitch.conf": |
17 |
path => "/etc/nsswitch.conf", |
18 |
owner => root, |
19 |
group => root, |
20 |
mode => 644, |
21 |
content => template("pam/system-auth") |
22 |
} |
23 |
} |
24 |
|
25 |
# for server where only admin can connect |
26 |
class admin_access inherits base { |
27 |
$access_class = "admin" |
28 |
# not sure if this line is needed anymore, wil check later |
29 |
file { "system-auth": } |
30 |
} |
31 |
|
32 |
# for server where people can connect with ssh ( git, svn ) |
33 |
class commiters_access inherits base { |
34 |
$access_class = "commiters" |
35 |
file { "system-auth": } |
36 |
} |
37 |
} |