Let PAM to provision users on their first login

Damien Miller djm at mindrot.org
Fri Nov 20 09:49:43 AEDT 2026


On Thu, 19 Nov 2026, Marco Trevisan wrote:

> Hi,
> 
> On 19 nov 2026 at 15:00, Theo de Raadt wrote:
> 
> > > > I agree.  The proposal is no longer compatible with Unix / POSIX
> > > > properties, and sshd the very last place this kind of thing should
> > > > occur.
> > > 
> > > It's unclear to me what you mean here. What is not-compatible?
> > 
> > In all traditional unix systems, a uid is already assigned to (at least one)
> > name entry.
> > Furthermore in 99% of Linux systems today, the uid is already assigned
> > in the same classic way.
> 
> Well this is quite untrue for many linux-glibc systems where openssh runs
> today that may rely on winbind, SSSD or systemd (via userdb or dynamic users).

So I think its worth separating nss, which from the applcation's
perspective just works behind the scenes, and what you're asking for
in this patch series.

With NSS, a provider and offer whatever getpw* information it wants and
applications like sshd just keep working.

With this patch series, AIUI you're saying that NSS *can't* provide
getpw* information and that sshd (and presumably every other app that
processes logins) is required to continue with a non-existent user on
the basis that it might be created at a very late stage in
authentication. This is a very differnt thing to ask for and one that
has much larger implications for application developers.

I don't understand why you couldn't have gone with (say) a solution
where NSS returns getpw* information for these accounts from the
start. This would have worked AFAIK for all applications that process
logins and wouldn't have require all of them to complicate themselves
by having to deal with maybe-invalid-maybe-valid-later.

-d


More information about the openssh-unix-dev mailing list