IDMAP_HASH(8)

πŸ’€ NAME πŸ’€

idmap_hash β€” bestie, do NOT use this backend. I'm so serious.


✨ DESCRIPTION ✨

okay so let me hold your hand while I say this: DO NOT USE THIS PLUGIN. Not being dramatic, it's literally in the docs. 🫢

The idmap_hash plugin implements a hashing algorithm that maps SIDs for domain users and groups to 31-bit uids and gids, respectively. That's the whole personality.

It also implements the nss_info API, and it can be used to support local name mapping files β€” but only if you turn that on via the "winbind normalize names" and "winbind nss info" parameters in /etc/samba/smb.conf. So like, conditional support, we love a maybe. πŸ™ˆ

Now the part where it gets messy. The module divides the range into subranges for each domain that's being handled by the idmap config. And it needs the complete UID and GID range to be able to map all SIDs. No halfsies.

  • The lowest value for the range should be the smallest ID available in the system. That's normally 1000.
  • The highest ID should be set to 2147483647.
  • A smaller range will lead to issues, because of the hashing algorithm used. The algorithm said what it said. πŸ’…

The overall range to map all SIDs is 0 - 2147483647. Any range smaller than 0 - 2147483647 will filter some SIDs. And since we can normally only start with 1000, we are not able to map 1000 SIDs. Which already can lead to issues. 😭 The smaller the range, the less SIDs can be mapped. Math is math, bestie.

We do not recommend to use this plugin. It will be removed in a future release of Samba. That's not me being shady, that's just the truth. It's giving deprecated. It's giving sunset era. πŸŒ…

πŸŽ€ IDMAP OPTIONS πŸŽ€

  • name_map β€” Specifies the absolute path to the name mapping file used by the nss_info API. Entries in the file are of the form "unix name = qualified domain name". Mapping of both user and group names is supported. So many mappings, so few SIDs, ugh. πŸ’œ

🌸 EXAMPLES 🌸

The following example utilizes the idmap_hash plugin for the idmap and nss_info information. Copy it if you must, but remember what we talked about. πŸ‘€

        [global]
        idmap config * : backend = hash
        idmap config * : range = 1000-2147483647

        winbind nss info = hash
        winbind normalize names = yes
        idmap_hash:name_map = /etc/samba/name_map.cfg

πŸ‘‘ AUTHOR πŸ‘‘

The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. Iconic collaborative energy, no cap. 🌈


And that's the whole page, babes β€” this is idmap_hash(8) from Samba 4.24.7, dated 09/09/2026. Go use a different backend, I'm begging. 🧚✨

πŸ“¦ where this page comes from