Let PAM to provision users on their first login

Marco Trevisan marco at ubuntu.com
Fri Nov 20 07:46:39 AEDT 2026


Hi,

On 19 nov 2026 at 14:07, Theo de Raadt wrote:

> Damien Miller <djm at mindrot.org> wrote:
>
>> I don't love this because it fairly significantly complicates
>> some of the most critical code in OpenSSH.
>>
>> If this were just reversing the order in which we call getpwnam() and
>> pam_start() then it wouldn't be so bad, but requiring sshd proceed 
>> with
>> an invalid account right up to the point of authentication success is
>> pretty scary.
>>
>> The "monitor: Receive PAM account requests only after authentication"
>> bit is good though and mirrors a hardening that I've wanted to do for
>> a while.
>
>
> 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?

> 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.

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.



More information about the openssh-unix-dev mailing list