Skip to content

Commit

Permalink
Merge pull request #12752 from alanmcanonical/ubt24_53327
Browse files Browse the repository at this point in the history
Ubuntu 24.04: Implement 5.3.3.2.7 Ensure password quality checking is enforced
  • Loading branch information
dodys authored Dec 20, 2024
2 parents b38f90e + 183a4c1 commit e589dbe
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
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

0 comments on commit e589dbe

Please sign in to comment.