Skip to content

Commit

Permalink
Add rule no_invalid_shell_accounts_unlocked
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmcanonical committed Jan 23, 2025
1 parent 2edb023 commit 98b4292
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/pam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ rules:
- no_empty_passwords
- no_empty_passwords_etc_shadow
- no_forward_files
- no_invalid_shell_accounts_unlocked
- no_legacy_plus_entries_etc_group
- no_legacy_plus_entries_etc_passwd
- no_legacy_plus_entries_etc_shadow
Expand Down
7 changes: 5 additions & 2 deletions controls/cis_ubuntu2404.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2208,8 +2208,11 @@ 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:
- no_invalid_shell_accounts_unlocked
status: automated
notes: |
Remediation is not automated.
- id: 5.4.3.1
title: Ensure nologin is not listed in /etc/shells (Automated)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
documentation_complete: true

title: 'Verify Non-Interactive Accounts Are Locked'

description: |-
Accounts meant for non-interactive purposes should be locked to prevent
unauthorized access. Accounts with non-standard shells (those not defined in
<tt>/etc/shells</tt>) should be locked using <tt>usermod -L</tt>.
rationale: |-
Locking non-interactive accounts improves security by preventing potential
misuse. While many systems configure these accounts with invalid strings,
setting the shell field to <tt>nologin</tt> is also suggested
severity: medium

warnings:
- general: |-
Automatic remediation of this control is not recommended. Locking system accounts
could be highly disruptive.

0 comments on commit 98b4292

Please sign in to comment.