Skip to main content
After installing Himmelblau and configuring himmelblau.conf, you need to wire the PAM and NSS modules into your Linux authentication stack.
Only modify PAM configuration if you understand the syntax. Mistakes can prevent all users — including local admins — from logging in. Test in a VM first, and keep a root shell open while making changes.

NSS configuration

NSS (Name Service Switch) allows getent passwd, getent group, and other tools to resolve Entra ID users.
1

Copy the default nsswitch.conf

On openSUSE/SUSE, copy the packaged default:
sudo cp /usr/etc/nsswitch.conf /etc/nsswitch.conf
On Debian/Ubuntu/Fedora this file is already at /etc/nsswitch.conf.
2

Add himmelblau to passwd, group, and shadow

Edit /etc/nsswitch.conf and add himmelblau to the passwd, group, and shadow lines:
/etc/nsswitch.conf
passwd:     compat systemd himmelblau
group:      compat systemd himmelblau
shadow:     compat systemd himmelblau
3

Test user resolution

getent passwd user@example.onmicrosoft.com
If the daemon is running and the domain is configured, this should return a passwd-format entry.
Disable nscd before using Himmelblau — it conflicts with the NSS module by caching stale entries:
sudo systemctl stop nscd
sudo systemctl disable nscd
sudo systemctl mask nscd

PAM configuration

The aad-tool configure-pam command automatically inserts the correct pam_himmelblau.so lines into your PAM files:
# Dry run — shows what would change without modifying anything
sudo aad-tool configure-pam

# Apply changes
sudo aad-tool configure-pam --really
To also add the optional try_unseal line (for unlocking secrets at login without touching other PAM stacks):
sudo aad-tool configure-pam --really --try-unseal

Manual setup

If you prefer to configure PAM manually, add the following lines to each file. The exact file names vary by distribution.
/etc/pam.d/common-auth
auth        required      pam_env.so
auth        [default=1 ignore=ignore success=ok] pam_localuser.so
auth        sufficient    pam_himmelblau.so ignore_unknown_user set_authtok
auth        sufficient    pam_unix.so nullok try_first_pass
auth        required      pam_deny.so
/etc/pam.d/common-account
account    [default=1 ignore=ignore success=ok] pam_localuser.so
account    sufficient    pam_himmelblau.so ignore_unknown_user
account    sufficient    pam_unix.so
account    required      pam_deny.so
/etc/pam.d/common-session
session optional    pam_systemd.so
session required    pam_limits.so
session optional    pam_himmelblau.so
session optional    pam_unix.so try_first_pass
session optional    pam_umask.so
session optional    pam_env.so
/etc/pam.d/common-password
password    sufficient    pam_himmelblau.so ignore_unknown_user set_authtok
password    optional      pam_gnome_keyring.so use_authtok
password    sufficient    pam_unix.so use_authtok nullok shadow try_first_pass
password    required      pam_deny.so

pam_himmelblau.so options

OptionDescription
ignore_unknown_userReturn PAM_IGNORE for users not in Entra ID, allowing the stack to fall through to pam_unix
set_authtokStore the authenticated token in PAM’s authtok field so downstream modules (e.g. gnome-keyring) can use it via use_authtok
try_unsealAttempt to unseal stored secrets at login time (optional add-on, does not affect the main auth stack)

SSH configuration

The himmelblau-sshd-config package installs an sshd configuration snippet that enables PAM-based authentication for SSH. This allows MFA challenges to be presented over SSH sessions. After installing the package, restart sshd:
sudo systemctl restart sshd

Build docs developers (and LLMs) love