Skip to content

Amazon Linux 2 Auditd fails to restart #270

@mfortin

Description

@mfortin

Describe the bug
Amazon Linux 2 fails to restart auditd service to apply changes.
Expected behavior
Service restart successfully

Actual behavior

Failed to restart auditd.service: Operation refused, unit auditd.service may be requested by dependency only (it is configured to refuse manual start/stop).

Example code

$ sudo systemctl restart auditd
Failed to restart auditd.service: Operation refused, unit auditd.service may be requested by dependency only (it is configured to refuse manual start/stop).
See system logs and 'systemctl status auditd.service' for details.

OS / Environment

Chef Version

14.7.17

Cookbook Version

4.0.0

Additional context
CentOS 7+ and Fedora 27+ had the same issue which is resolved by running service auditd restart. This alternate method should also include Amazon Linux 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions