[PATCH] Check idmap config with testparm

Andreas Schneider asn at samba.org
Wed Dec 7 17:43:35 UTC 2016


Hello,

you might know I work for a Distributor and fix winbind issues there every 
day.
I see so many invalid idmap configurations, I think 70% of the configs are 
wrong or invalid. In addition our documentation for ID mapping really sucks! 
So I had a call with Marc and he started to improve it. See the User 
documentation in the Wiki.

While trying to chase down a winbindd bug the last days I read all the changes 
last year and stumbled upon Volkers nice lp_wi_scan_global_parametrics() 
function again. So I decided it is time to check the idmap config in testparm. 

So here we go ...


<config>
        idmap config * : backend = rid
        idmap config * : range = 1000000-1999999

        # Winbind domain idmap
        idmap config EARTH : backend = rid
        idmap config EARTH : range = 100000000-199999999

        idmap config MARS : backend = rid
        idmap config MARS : range = 200000000-299999999

        idmap config VENUS : backend = rid
        idmap config VENUS : range = 150000000-399999999
</config>

<console>
bin/testparm smb.conf.ads > /dev/null
Load smb config files from smb.conf.ads

ERROR: Do not use the 'rid' backend for the default backend (idmap config *)!

ERROR: The idmap range for the domain MARS overlaps with the range of VENUS

Server role: ROLE_DOMAIN_MEMBER

Press enter to see a dump of your service definitions
</console>

Review and push of the attached patchset is much appreciated!


Thanks,



	Andreas


-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testparm_idmap.patch
Type: text/x-patch
Size: 7602 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161207/56623b8e/testparm_idmap.bin>


More information about the samba-technical mailing list