Puppet Class: pam_access

Defined in:
manifests/init.pp

Overview

Class: pam_access

This module manages pam_access

this module manages /etc/security/access.conf file

Parameters:

$exec: true, false

If true, pam_access will take care of calling authconfig to apply its
changes; if false, you must do this yourself elsewhere in your manifest.

Actions:

Requires:

See pam_access::entry for more documentation.

Remember: No empty lines between comments and class definition

Parameters:

  • exec (Any) (defaults to: true)


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'manifests/init.pp', line 20

class pam_access (
  $exec = true
) {
  if $::pam_access {

    file { '/etc/security/access.conf':
      ensure  => 'present',
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
    }

    if $pam_access::exec {

      exec { 'authconfig-access':
        command => 'authconfig --enablelocauthorize --enablepamaccess --update',
        path    => '/usr/bin:/usr/sbin:/bin',
        unless  => "grep '^account.*required.*pam_access.so' \
                      /etc/pam.d/system-auth 2>/dev/null",
        require => File['/etc/security/access.conf'],
      }
    }

  } else {
    debug('pam_access not implemented on this platform')
  }
}