# Ensure NIS Client is not installed

The Network Information Service (NIS), also known as Yellow Pages (YP), is an outdated client-server directory service protocol for distributing system configuration data. Its fundamental flaw is the transmission of all information, including password hashes, in cleartext over the network, making it highly vulnerable to eavesdropping and credential theft. The presence of the NIS client service creates a significant and unnecessary security risk. The audit script verifies whether the 'nis' package is installed on the system. The remediation script ensures its removal by purging the package, which also deletes its configuration files. Because NIS is fundamentally insecure, the only recommended state for any security level (Basic, Moderate, and Strict) is 'Not Installed'. There is no scenario in a modern security context where enabling the NIS client is considered safe. Its complete removal is essential to eliminate the risk of sensitive account information being exposed on the network.

## Recommended State Configuration

| Security Level | Value |
|----------------|-------|
| **Basic** | `['Not Installed']` |
| **Moderate** | `['Not Installed']` |
| **Strict** | `['Not Installed']` |
| **Type** | `ENUM` |

## Audit Script Working

Bash script that checks if the 'nis' package is installed. The script must output 'Installed' if the package is present and 'Not Installed' if it is not. The output must exclusively be one of these two strings, with no additional text or formatting.

## Remediation Script Working

Bash script that accepts a single positional argument, which will be the desired state ('Not Installed'). If the provided argument is 'Not Installed', the script must attempt to purge the 'nis' package using 'apt-get purge -y nis'. The script must output 'true' if the package is successfully removed or was already absent, and 'false' if the removal process fails.

