Skip to content
Open
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
1 change: 0 additions & 1 deletion base/comps/components.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6580,7 +6580,6 @@ overlay-files = ["overlays/*.overlay.toml"]
[components.sgpio]
[components.sgx-rpm-macros]
[components.shaderc]
[components.shadow-utils]
[components.shake]
[components.shapelib]
[components.shared-mime-info]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[metadata]
category = "azl-security-compliance"
upstream-status = "inapplicable"
bugs = [
{ url = "https://dev.azure.com/mariner-org/mariner/_workitems/edit/22929" },
{ url = "https://dev.azure.com/mariner-org/mariner/_workitems/edit/22930" },
]

# These defaults apply only when useradd creates an account; existing platform
# accounts retain their current aging policy.
[[overlays]]
description = "Set the CIS maximum password age for new accounts"
type = "file-search-replace"
file = "shadow-utils.login.defs"
regex = '(?m)^PASS_MAX_DAYS\s+\d+$'
replacement = "PASS_MAX_DAYS\t365"

@christopherco Christopher Co (christopherco) Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (blocking): What happens for key-only SSH users?

Copilot seems to flag that for key-only users (password-auth disabled), after 365 days, OpenSSH will change into the password update mode. And since the key-only user has no current password, they wouldn't be able to change the password, and after 30 more days, they'd get locked out fully. This key-only user creation is also our default setup in Azure VMs with cloud-init user provisioning.


[[overlays]]
description = "Lock inactive password accounts after the CIS grace period"
type = "file-search-replace"
file = "shadow-utils.useradd"
regex = '(?m)^INACTIVE=-?\d+$'
replacement = "INACTIVE=30"
1 change: 1 addition & 0 deletions base/comps/shadow-utils/shadow-utils.comp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[components.shadow-utils]
2 changes: 1 addition & 1 deletion locks/shadow-utils.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ version = 1
import-commit = 'b75f74d3f1b086fd5e699e55f131ae9e1beca525'
upstream-commit = 'b75f74d3f1b086fd5e699e55f131ae9e1beca525'
manual-bump = 2
input-fingerprint = 'sha256:150fe6edc893cb2948b25784f202abee5da23bd9d96b628db616e0aa8d57d71c'
input-fingerprint = 'sha256:57dd9d454cf706a01ee62266029fdb35365a122cc1f03df45a8c0ac93f8eba5a'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
2 changes: 1 addition & 1 deletion specs/s/shadow-utils/shadow-utils.login.defs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ HOME_MODE 0700
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MAX_DAYS 365
PASS_MIN_DAYS 0
PASS_MIN_LEN 8
PASS_WARN_AGE 7
Expand Down
2 changes: 1 addition & 1 deletion specs/s/shadow-utils/shadow-utils.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Summary: Utilities for managing accounts and shadow password files
Name: shadow-utils
Version: 4.18.0
Release: 6%{?dist}
Release: 7%{?dist}
Epoch: 2
License: BSD-3-Clause AND GPL-2.0-or-later
URL: https://github.com/shadow-maint/shadow
Expand Down
2 changes: 1 addition & 1 deletion specs/s/shadow-utils/shadow-utils.useradd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
INACTIVE=30
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
Expand Down
Loading