Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 24.04: Implement 5.3.3.2.7 Ensure password quality checking is enforced #12752

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions controls/cis_ubuntu2404.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1985,8 +1985,10 @@ controls:
levels:
- l1_server
- l1_workstation
status: planned
notes: TODO. Rule does not seem to be implemented, nor does it map to any rules in ubuntu2204 profile.
rules:
- var_password_pam_enforcing=1
- accounts_password_pam_enforcing
status: automated

- id: 5.3.3.2.8
title: Ensure password quality is enforced for the root user (Automated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,19 @@ ocil: |-

platform: package[pam]

{{% if product == "ubuntu2404" %}}
template:
name: accounts_password
vars:
variable: enforcing
operation: equals
{{% else %}}
template:
name: "lineinfile"
vars:
text: "enforcing = 1"
path: "/etc/security/pwquality.conf"
oval_extend_definitions:
- accounts_password_pam_pwquality
{{% endif %}}

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/bash

{{% if product == "ubuntu2404" %}}
{{{ bash_pam_pwquality_enable() }}}
{{% endif %}}

echo 'enforcing = 1' > /etc/security/pwquality.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
documentation_complete: true

title: enforcing

description: |-
Disallow a password that does not meet the criteria

type: number

operator: equals

interactive: false

options:
1: 1
default: 1

Loading