---
title: Ensure that /etc/at.deny does not exist
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Datadog Security > OOTB Rules > Ensure that /etc/at.deny does not exist
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Ensure that /etc/at.deny does not exist
 
## Description{% #description %}

The file `/etc/at.deny` should not exist. Use `/etc/at.allow` instead.

## Rationale{% #rationale %}

Access to `at` should be restricted. It is easier to manage an allow list than a deny list.

## Remediation{% #remediation %}

### Shell script{% #shell-script %}

The following script can be run on the host to remediate the issue.

```bash
#!/bin/bash

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel-core && { rpm --quiet -q at; }; then

if [[ -f  /etc/at.deny ]]; then
        rm /etc/at.deny
    fi

else
    >&2 echo 'Remediation is not applicable, nothing was done'
fi
```

### Ansible playbook{% #ansible-playbook %}

The following playbook can be run with Ansible to remediate the issue.

```go
- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - CCE-86945-3
  - NIST-800-171-03.01.02
  - PCI-DSSv4-2.2
  - PCI-DSSv4-2.2.6
  - disable_strategy
  - file_at_deny_not_exist
  - low_complexity
  - low_disruption
  - medium_severity
  - no_reboot_needed

- name: Ensure that /etc/at.deny does not exist - Remove /etc/at.deny
  ansible.builtin.file:
    path: /etc/at.deny
    state: absent
  when:
  - '"kernel-core" in ansible_facts.packages'
  - '"at" in ansible_facts.packages'
  tags:
  - CCE-86945-3
  - NIST-800-171-03.01.02
  - PCI-DSSv4-2.2
  - PCI-DSSv4-2.2.6
  - disable_strategy
  - file_at_deny_not_exist
  - low_complexity
  - low_disruption
  - medium_severity
  - no_reboot_needed
```
