Let PAM to provision users on their first login

Marco Trevisan marco at ubuntu.com
Fri Nov 20 08:30:39 AEDT 2026


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 what you are describing is a new behaviour.  We are on the same 
> page,
> right?

Not really, glibc allows NSS modules for ever, and indeed things like
systemd-userdb are changing the game in that direction.

>>> Outside of the sshd context, I think the Ubuntu design is extremely
>>> dangerous and in time there will be interesting consequences.
>>
>> What we did is mostly because the SSH behavior is not complying with 
>> any
>> other UNIX tool out there, as it requires user accounts to exist 
>> ahead
>> of
>> time, while that's against any NSS design out there IMHO.
>
> Most unix systems do not use NSS, let alone this extension you are
> talking about.

By "most" you mean most of the unix implementations, not of the unix
systems out there, that being by far based on glibc they do have NSS
by default (but also Solaris/illumos, FreeBSD and NetBSD IIRC).

>> What we did in our NSS module is of course not great because it makes
>> way more complex something that should be just work, but the way it's
>> designed did not outline major issues so far. Hoping that will 
>> continue.
>
> Then we come to that you've made custom changes to NSS, which did not
> exist.. until recently, right?

Nope, NSS is just pluggable as PAM is, and what we did is a specific 
module
that just expose our users. We did not change NSS per se, but we just 
have
a module that exposes an user to SSHd when it asks for it.

But we did not change NSS per se, the way NSS works is the same and can 
be
driven differently by systemd, or winbind or others.



More information about the openssh-unix-dev mailing list