by derefr · 8y ago · 0 comments
I'm not sure I understand what part of Linux's account security model relies on glibc to make changes. Can't PAM pull in whatever libraries it likes?
If not, then why hasn't (any popular distro of) Linux moved toward the Windows/macOS model of unifying account management + AAA onto a single "directory services only" code-path, where a system that's not "part of a directory" is actually just part of its own "directory of one", with your system running its own little LDAP+Kerberos daemons or what-have-you that your local accounts reside in?
In that sort of model (which, again, is what Windows and macOS both use exclusively nowadays), the kernel, C library, etc. aren't involved in deciding AAA policy; they just implement the simple AAA mechanism of "let users with the right ACL token do the things the ACL token says they can do" and then rely on one or more [local or remote] directory-service servers to actually authenticate users and issue those tokens to them. Drastically smaller attack surface.
I can't seem to find, in an offhand and quick glance at search results, any library that I know of to accomplish this task. Doesn't mean it can't be or hasn't been done though. I know for a fact that plain text passwords are passable to authentication libraries since that's how AD integration works.
Though there also seems to be some recent interest in implementing support in crypt() https://sourceware.org/bugzilla/show_bug.cgi?id=21421
Using a daemon is against UNIX philosophy, and also poses a lot of problems, that daemon is just another piece of software that could fail for many reasons, and when it fails what you do ? You can't login to fix the problem, even as root and even in single user mode! So you are basically screwed.
How many times you had a problem regarding user authentication on Linux ? I never had, I was always able to log in into my system to repair it even when I completely broke it.
[0] - https://sourceware.org/bugzilla/show_bug.cgi?id=16814
And certainly, if you move the authentication to another service, such as I mentioned with MFA, or LDAP+Kerberos as you mentioned, that could address this, assuming that system supports scrypt / bcrypt.
(towards the bottom of the manual page: http://man7.org/linux/man-pages/man3/crypt.3.html )