pam_localusers does not support systemd dynamic users

Open
#986 5 comments 0 reactions 0 assignees View on GitHub

@maccadia is already working on this.

Since Jun 8, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c, linux

Research direction

Start with modules/pam_localuser/pam_localuser.c, especially the call to pam_modutil_check_user_in_passwd, and read the linked Ubuntu SSSD configuration and discussion to clarify the intended behavior for dynamic users. Done means the project has a clear decision on whether these users count as local, with tests covering that behavior.

Written by the indexing model from the issue text.

Description

question

Systemd has introduced dynamic users with systemd 235 (2017) : https://0pointer.net/blog/dynamic-users-with-systemd.html

These users are arguably local. However, pam_localusers only checks /etc/passwd via pam_modutil_check_user_in_passwd.

Should pam_localuser support these dynamic users ?

A notable use case is the default PAM Account config for SSSD on Ubuntu:

# /etc/pam.d/common-account - authorization settings common to all services
account	[success=1 new_authtok_reqd=done default=ignore]	pam_unix.so 
account	requisite			pam_deny.so
account	required			pam_permit.so
account	sufficient			pam_localuser.so 
account	[default=bad success=ok user_unknown=ignore]	pam_sss.so 

See https://bugs.launchpad.net/ubuntu/+source/sssd/+bug/2151186

Dominant language
C
Stars
807
Forks
368
Avg merge
6d 16h
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linux-pam/linux-pam

All issues in linux-pam/linux-pam

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.