I have an existing user database in Keycloak.

I want to build a Linux machine which logs in users according to the user database in Keycloak (username, password).

How can I accomplish this?


You would have to implement the following:

  1. add NSS passwd map data to Keycloak user accounts (POSIX-UID, primary POSIX-GID, etc.)
  2. implement a service pulling NSS data from Keycloak and make it locally available on Linux system
  3. implement a PAM module sending password authentication requests to Keycloak

While it's not impossible it would be quite some development work.

The usual way of having centralized user management for Unix/Linux is to set up a LDAP server storing the relevant data. And then configure Keycloak to use this LDAP server for retrieving user data and check passwords.

There are ready-to-use solutions available like FreeIPA or my own Æ-DIR.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.