I am wondering how the login actually works. It certainly is not part of the kernel, because I can set the login to use ldap for example, or keep using /etc/passwd; but the kernel certainly is able to use information from it to perform authentication and authorization activities.
There is also a systemd daemon, called logind which seems to start up the whole login mechanism.
Is there any design document I can look at, or can someone describe it here?