Univention Bugzilla – Bug 42819
samba4-idmap.py listener doesn't initialize idmap.ldb metadata when file has been deleted.
Last modified: 2017-04-04 18:29:15 CEST
Created attachment 8179 [details] initialize_idmap.patch The samba4-idmap.py listener currently doesn't check if the idmap.ldb is properly initialized. In re-joining scenarios we often remove the idmap.ldb and then let the listener re-fill it. But then these basic metadata objects are missing: cat /usr/share/samba/setup/idmap_init.ldif ============================= dn: CN=CONFIG cn: CONFIG lowerBound: 3000000 upperBound: 4000000 dn: @INDEXLIST @IDXATTR: xidNumber @IDXATTR: objectSid ============================= As a consequence, winbind cannot dynamically allocate any xidNumber (UIDs/GIDs) for accounts that for some reason do not have a proper idmap entry yet (e.g. due to Bug 36570). The attached patch fixes this by calling samba.provision.setup_idmapdb() in case the file doesn't exist during open. Untested.
The Enterprise Customer affected flag is set but neither a Ticket number is referenced nor a Customer ID is set. Please set a Ticket number or a Customer ID. Otherwise the Enterprise Customer affected flag will be reset.
I've applied an improved version of the patch. Package rebuilt and changelog adjusted. Package: univention-samba4 Version: 6.0.9-4A~4.2.0.201702151909 Branch: ucs_4.2-0 QA: univention-directory-listener-ctrl samba4-idmap resync ldbsearch -H /var/lib/samba/private/idmap.ldb CN=CONFIG ldbsearch -H /var/lib/samba/private/idmap.ldb -b "@INDEXLIST" -s base rm /var/lib/samba/private/idmap.ldb service univention-directory-listener stop univention-directory-listener-ctrl samba4-idmap resync ldbsearch -H /var/lib/samba/private/idmap.ldb CN=CONFIG ldbsearch -H /var/lib/samba/private/idmap.ldb -b "@INDEXLIST" -s base
Tests: OK, it the entries are available after rejoining the system. Code review: OK (r76714) Changelog: OK
UCS 4.2 has been released: https://docs.software-univention.de/release-notes-4.2-0-en.html https://docs.software-univention.de/release-notes-4.2-0-de.html If this error occurs again, please use "Clone This Bug".