# Ensure access to /etc/issue.net is configured

The `/etc/issue.net` file contains a message or system identification banner that is displayed to users connecting to the system over a network (e.g., via SSH). It is critical for displaying legal notices and warnings against unauthorized access. Correctly configuring its permissions is necessary to prevent unauthorized users from modifying or deleting the banner. Tampering with this file could remove crucial legal warnings, which might impact the legal recourse available after a security incident, or be used to display misleading information to trick legitimate users. The audit script verifies the file's current ownership and permissions against security best practices. The remediation script uses system commands (`chown`, `chmod`) to enforce the specified ownership and access permissions on the file. The recommended states provide increasing levels of security: Basic (`root:root 644`) is the standard configuration preventing modification by non-root users, as recommended by CIS benchmarks. Moderate (`root:root 640`) enhances this by restricting read access from the 'others' category, reducing the file's visibility to unprivileged accounts. Strict (`root:root 600`) offers the highest security by ensuring only the root user can read or write the file, completely isolating it from all other users on the system.

## Recommended State Configuration

| Security Level | Value |
|----------------|-------|
| **Basic** | `['root:root 644']` |
| **Moderate** | `['root:root 640']` |
| **Strict** | `['root:root 600']` |
| **Type** | `ENUM` |

## Audit Script Working

Bash script that queries the ownership and permissions of the `/etc/issue.net` file. The script must output a single string in the format 'owner:group permissions' (e.g., 'root:root 644') and nothing else.

## Remediation Script Working

Bash script that accepts two positional command-line arguments: the desired ownership in 'user:group' format (e.g., 'root:root') and the desired octal permissions (e.g., '644'). The script must use these arguments to set the ownership and permissions for the `/etc/issue.net` file and must output 'true' on success or 'false' on failure.

