Let PAM to provision users on their first login

Nico Williams nico at cryptonector.com
Tue Nov 24 05:41:03 AEDT 2026


On Mon, Nov 23, 2026 at 06:30:38PM +0000, Marco Trevisan wrote:
> On 23 nov 2026 at 11:51, Nico Williams wrote:
> > Maybe it's time to design a replacement for PAM.
> 
> Yeah, I'd be open to that... And it's something I've been thinking on
> too.
> 
> We had lots of discussion with systemd folks that lead to starting
> drafting https://github.com/systemd/systemd/pull/39855
>
> [...]
>
> Well it basically should support what systemd-userdb already allows.

I would urge that any such thing not be too systemd-specific.  The rest
of the Unix-ish world, and much of the Linux world, does not want
systemd.

(I am a fan of the systemd approach, which really goes back to
Solaris/Illumos SMF, and also the Windows service model, but I'm not a
fan of the implementation.)

> > This thing should be as utterly simple as possible.
> 
> Yeah, true... But you know, if you go through supporting APIs through IPC
> you'd end up still making things more complex once you need to support new
> things.

PAM has barely evolved for 30 years.  It's been a brake on evolution of
Unix-ish systems.  The new thing should unlock innovation to a point,
then barely evolve for a long time too.

> But indeed the basic API should be very simple, leading to implementations
> to go through details.
> 
> However, this is something that is very far from our radars, and while PAM
> is not perfect it still the current standard.

-1

It's time to reinvent this wheel.

> Even if we end up designing something simpler and better than PAM, the main
> topic here would likely stay: Can we delay the user check to the point the
> authentication has been fully completed?

Yes, of course.  Windows does that.

BTW, parts of the Windows security architecture are much much better
than the Unix security architecture:

 - SIDs -- much better than UIDs and GIDs

 - access tokens -- atomic process/thread credentials, and much better
   than the piecemeal system call interface to struct cred

 - security descriptors -- atomic object permissions (file ownership,
   mode, ACL)

Nico
-- 


More information about the openssh-unix-dev mailing list