Puppet Class: cis_security_hardening::rules::nis_client

Defined in:
manifests/rules/nis_client.pp

Summary

Ensure NIS Client is not installed

Overview

The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files. The NIS client (ypbind) was used to bind a machine to an NIS server and receive the distributed 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 has been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is recommended that the service be removed.

Examples:

class { 'cis_security_hardening::rules::nis_client':
    enforce => true,
}
include cis_security_hardening::rules::nis_client

Parameters:

  • enforce (Boolean) (defaults to: false)

    Enforce the rule



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/rules/nis_client.pp', line 26

class cis_security_hardening::rules::nis_client (
  Boolean $enforce = false,
) {
  if $enforce {
    if $facts['os']['name'].downcase() == 'ubuntu' {
      $pkg = 'nis'
    } else {
      $pkg = 'ypbind'
    }

    $ensure = $facts['os']['family'].downcase() ? {
      'suse'  => 'absent',
      default => 'purged',
    }

    ensure_packages($pkg, {
        ensure => $ensure,
    })
  }
}