IDMAP_AD(8)
β¨ IDMAP_AD β Samba's idmap_ad Backend for Winbind β¨
ok bestie, so this is idmap_ad(8), the manual page for the idmap_ad backend. It's a Winbind thing, it's very "read-only queen", and we're gonna get you all the way through it π
π NAME π
idmap_ad β Samba's idmap_ad Backend for Winbind
π¦ DESCRIPTION π¦
So the idmap_ad plugin is literally the way Winbind reads id mappings off an AD server that's running RFC2307/SFU schema extensions. That's its whole thing. πΈ
Now, important: this module implements only the "idmap" API, and it is READONLY. Not "read-only-ish". READONLY. Periodt. π€
Which means the mappings have to be handed over in advance by the administrator β you go into the AD and add uidNumber attributes for users and gidNumber attributes for groups. That's on you, bestie, the plugin will not do it for you.
Winbind will only map users that have a uidNumber and whose primary group has a gidNumber attribute set. That "and" is doing a lot of heavy lifting, so pay attention. π
And yeah β it is however recommended that all groups in use have gidNumber attributes assigned, otherwise they are not working. No cap, an unassigned group is just... not working. π«
Now for the plot twist: currently, the ad backend does not work as the default idmap backend. Not the main character in that slot, sorry. Instead you have to configure it separately for each domain you want to use it for, and you use disjoint ranges while you're at it.
You'll usually also need to configure a writeable default idmap range β using, for example, the tdb or ldap backend β so you can actually map the BUILTIN sids and possibly other trusted domains. π«
And the writeable default config is also needed in order to be able to create group mappings. Yes, both. It's giving "you need the boring one so the cool one can function."
This catch-all default idmap configuration should have a range that is disjoint from any explicitly configured domain with idmap backend ad. See the example below, we gotchu. π
β¨ IDMAP OPTIONS β¨
range = low - highβ Defines the available matching UID and GID range for which the backend is authoritative. Note that the range acts as a filter. If specified, any UID or GID stored in AD that falls outside the range is ignored and the corresponding map is discarded. It's intended as a way to avoid accidental UID/GID overlaps between local and remotely defined IDs. π§schema_mode = <rfc2307 | sfu | sfu20>β Defines the schema thatidmap_adshould use when querying Active Directory regarding user and group information. This can be either the RFC2307 schema support included in Windows Server 2003 R2 and newer, or the Service for Unix (SFU) schema for versions before Windows Server 2003 R2. For SFU 3.0 or 3.5 please choose"sfu", for SFU 2.0 please choose"sfu20". Please note that the behavior of primary group membership is controlled by theunix_primary_groupoption.
Default: rfc2307
unix_primary_group = yes/noβ Defines whether the user's primary group is fetched from the SFU attributes or the AD primary group. If set toyes, the primary group membership is fetched from the LDAP attributes (gidNumber). If set tono, the primary group membership is calculated via the"primaryGroupID"LDAP attribute.
Default: no
unix_nss_info = yes/noβ If set toyes, winbind will retrieve the login shell and home directory from the LDAP attributes. If set tono, or the AD LDAP entry lacks the SFU attributes, the optionstemplate shellandtemplate homedirare used.
Default: no
all_groupmem = yes/noβ If set toyes, winbind will retrieve all group members forgetgrnam(3),getgrgid(3)andgetgrent(3)calls, including those with missinguidNumber.
Default: no
deny ousβ This parameter is a list of OUs from which objects will not be mapped via theadidmap module. Ifdeny ousis set butallow ousis not set, every object outside the OUs listed indeny ousis allowed.
Default: none
allow ousβ This parameter is a list of OUs from which objects will be mapped via theadidmap module. Ifallow ousis set butdeny ousis not set, every object outside the OUsallow ousis denied.
If both allow ous and deny ous are set, deny ous is evaluated first, then allow ous is looked at. If an AD object matches neither, it is denied. π«
Default: none
π EXAMPLES π
The following example shows how to retrieve idmappings from our principal and trusted AD domains. If trusted domains are present, id conflicts must be resolved beforehand β there is no guarantee on the order conflicting mappings would be resolved at this point. π
This example also shows how to leave a small non conflicting range for local id allocation that may be used in internal backends like BUILTIN.
[global]
workgroup = CORP
idmap config * : backend = tdb
idmap config * : range = 1000000-1999999
idmap config CORP : backend = ad
idmap config CORP : range = 1000-999999
π 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.
ok that's the whole page, you ate that fr fr π«Ά this was IDMAP_AD(8) from Samba 4.24.7, dated 09/09/2026 β go forth and map those ids, bestie πβ¨π
π¦ where this page comes from
- fedora 44: samba-winbind 2:4.24.7-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms