GrepBoard/Manuals
605 manuals ·

Fix systemd status=224/PAM

·Tested on Ubuntu 24.04 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11·Test scope ↓·4 steps

Trace systemd status=224/PAM from User= and PAMName= to the PAM policy. Use the journal to distinguish an account rejection from a session module failure.

output
    Process: 130 ExecStart=/usr/bin/true (code=exited, status=224/PAM)

If status=224/PAM accompanies a PAM setup failure, find the policy selected by PAMName= and the account passed to it. A rejection during setup stops systemd before it starts the ExecStart= program.

[1] Read the account and PAM service names separately. Replace myapp.service with the affected unit.

console
# systemctl show myapp.service -p User -p PAMName -p ExecStart# systemctl cat myapp.service# systemctl status --full --no-pager myapp.service# journalctl -b -u myapp.service -n 50 --no-pager

User= names the account. PAMName= selects the PAM policy. The v255 manual specifies that PAMName= takes effect only with User=. If the loaded value differs from the unit file, inspect the drop-ins listed by systemctl cat. For 217/USER, first check service account lookup and switching.

[2] Match the selected account and policy to the deployment. These commands assume User=myapp, PAMName=myapp-worker and a service-specific file deployed under /etc/pam.d.

console
# getent passwd myapp# ls -l /etc/pam.d/myapp-worker# cat /etc/pam.d/myapp-worker

A successful account lookup still leaves PAM account checks to run. If the dedicated file is missing, check the spelling of the service name and where the package installed its policy. A missing local file alone does not establish the cause of 224. If the file exists, follow any included policies.

[3] Match module messages to the failed start time. In v255, setup_pam() calls pam_acct_mgmt() after pam_start(). Account management must succeed before pam_open_session() runs. Either failure can reach the same 224 exit in the caller.

Journal clueWhere to look
An account expiry or access policy rejectionThe service’s account stack. Resolving the account and permitting it to use the service are separate checks.
A module reports a failure opening the sessionThe session stack. Match the module name to its options.
The unit logs only a generic session setup failureRead the journal at the same time without the unit filter. Correlate service and module names. Without further evidence, the failing module remains unknown.

The dedicated PAM policy kept account required pam_permit.so and denied session opening with session required pam_deny.so. The journal recorded both errors.

output
Nov 23 02:33:57 server1 (true)[130]: PAM failed: Cannot make/remove an entry for the specified sessionNov 23 02:33:57 server1 (true)[130]: gb224-3vwiBTWZ-fail.service: Failed to set up PAM session: Operation not permitted

With the same account and policy name, changing only the session rule to session required pam_permit.so let the control unit start.

output
    Process: 155 ExecStart=/usr/bin/true (code=exited, status=0/SUCCESS)

Replacing a rejection with unconditional permission in a production stack would remove an access restriction.

[4] Restore the service-specific configuration. If the unit selects another service’s policy, record the previous value and correct the name against the deployment specification. If the policy differs from the packaged configuration, inspect the difference and restore the required module or option. Keep this test confined to a dedicated policy so shared login and SSH rules stay in effect.

After editing the unit file, run systemctl daemon-reload. A PAM-only edit is read when a new session opens. Start the failed service and inspect that attempt.

console
# systemctl start myapp.service# systemctl show myapp.service -p Result -p ExecMainStatus# journalctl -b -u myapp.service -n 30 --no-pager

To roll back, restore the previous policy lines or unit value. Reload unit edits and restart to apply them. Restarting interrupts a running service. If the program now starts and returns another exit code, continue with service failure diagnostics.

Analyze your syslog · journal log in the browser ↗ — nothing is uploaded.

#systemd#pam#pamname