Puppet Class: cis_security_hardening::rules::nis

Defined in:
manifests/rules/nis.pp

Summary

Ensure NIS Server is not enabled

Overview

The Network Information Service (NIS) (formally known as Yellow Pages) is a client-server directory service protocol for distributing system configuration files. The NIS server is a collection of programs that allow for the distribution of configuration files.

Rationale: The NIS service is inherently an insecure system that has been vulnerable to DOS attacks, buffer overflows and has poor authentication for querying NIS maps. NIS generally been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is recommended that the service be disabled and other, more secure services be used.

Examples:

class cis_security_hardening::rules::nis {
    enforce => true,
}

Parameters:

  • enforce (Boolean) (defaults to: false)

    Enforce the rule



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/rules/nis.pp', line 23

class cis_security_hardening::rules::nis (
  Boolean $enforce = false,
) {
  if $enforce {
    case $facts['os']['name'].downcase() {
      'ubuntu': {
        ensure_packages(['nis'], {
            ensure => purged,
        })
      }
      'sles':{
        ensure_packages(['ypserv'], {
            ensure => absent,
        })
      }
      default: {
        ensure_resource('service', ['ypserv'], {
            ensure => 'stopped',
            enable => false
        })
      }
    }
  }
}