IDMAP_SCRIPT(8) System Administration tools IDMAP_SCRIPT(8) (NAME) idmap_script - idmap_script Samba Winbind (DESCRIPTION) idmap_script idmap_tdb2 winbindd SID/uid/gid Samba CTDB . . idmap_tdb2 SID/uid/gid TDB winbind_cache tdb . (IDMAP OPTIONS) range = low - high UID GID . script . (IDMAP SCRIPT) script /etc/samba/smb.conf idmap config * : script idmap : script . . SIDTOID S-1-xxxx IDTOSID UID xxxx IDTOSID GID xxxx IDTOSID XID xxxx . UID:yyyy GID:yyyy XID:yyyy SID:ssss ERR:yyyy XID UID GID . ID_TYPE_BOTH . UID GID . (EXAMPLES) script idmap script : [global] idmap config * : backend = script idmap config * : range = 1000000-2000000 idmap config * : script = /usr/local/samba/bin/idmap_script.sh : #!/bin/sh # # Uncomment this if you want some logging #echo $@ >> /tmp/idmap.sh.log if [ "$1" == "SIDTOID" ] then # Note. The number returned has to be within the range defined #echo "Sending UID:1000005" >> /tmp/idmap.sh.log echo "UID:1000005" exit 0 else #echo "Sending ERR: No idea what to do" >> /tmp/idmap.sh.log echo "ERR: No idea what to do" exit 1 fi wbinfo SID SID UID . _NO_WINBINDD 1 . winbind wbinfo nss_winbind . ls -l . wbinfo -n wbinfo -s idmap . _NO_WINBINDD wbinfo (unset) wbinfo 1 . (AUTHOR) Samba Andrew Tridgell . Samba Samba Team . Samba 4.24.6 08/16/2026 IDMAP_SCRIPT(8)