Skip to main content

password-status

Overview​

Authentication and user access validation checks for verifying password status and file system permissions.

password-status​

Checks if a user's password status matches expected configuration using passwd -S.

Command-Line Options​

OptionTypeDefaultDescription
--user, -uStringrootUser account to check
--status, -sStringPSExpected password status code
--sudo / --no-sudoFlagTrueExecute command with/without sudo
--timeoutInteger300Command execution timeout in seconds
--sinkStringdo_nothingTelemetry sink destination
--sink-optsMultiple-Sink-specific configuration
--verbose-outFlagFalseDisplay detailed output
--log-levelChoiceINFODEBUG, INFO, WARNING, ERROR, CRITICAL
--log-folderString/var/log/fb-monitoringLog directory
--heterogeneous-cluster-v1FlagFalseEnable heterogeneous cluster support

Password Status Codes​

passwd -S prints the second field as a short status token. The set of tokens changed between shadow-utils versions: CentOS Stream 9 and earlier print the long form (PS, LK), while CentOS Stream 10 (newer shadow-utils) print the single-letter form (P, L). The check accepts both forms for each state, so passing --status PS matches a P output and vice versa. This avoids per-host --status overrides during the CentOS 10 rollout.

Expected (--status)MeaningAccepted passwd -S outputs
PS (or P)Password setPS, P
LK (or L)Password lockedLK, L
NPNo passwordNP

Exit Conditions​

Exit CodeCondition
OK (0)Feature flag disabled (killswitch active)
OK (0)Password status matches expected value
WARN (1)Command execution failed
CRITICAL (2)Password status does not match expected value

Usage Examples​

# Check root password is set
health_checks check-authentication password-status [CLUSTER] app

# Check specific user without sudo
health_checks check-authentication password-status --user myuser --no-sudo [CLUSTER] app

# Verify password is locked
health_checks check-authentication password-status --user backup --status LK [CLUSTER] app