Thomas de la Tourette
2022-Jul-17 00:15 UTC
[Samba] AD-DC samba_gpoupdate fails with exception
Samba 4.16.2 samba-gpupdate --forceaborts with following truntime error: lpcfg_load: refreshing parameters from /etc/samba/smb.conf Processing section "[global]" Can't find include file registry pm_process() returned No Traceback (most recent call last): ? File "/usr/bin/samba-gpupdate", line 77, in <module> ??? lp = sambaopts.get_loadparm() ? File "/usr/lib/python3.10/site-packages/samba/getopt.py", line 92, in get_loadparm ??? self._lp.load_default() RuntimeError: Unable to load default file It seems that the Python load module is not aware of Samba registry configuration and the required settings in smb.conf:include = registry. Are there any workarounds available?
On Sun, 2022-07-17 at 00:15 +0000, Thomas de la Tourette via samba wrote:> Samba 4.16.2 > samba-gpupdate --forceaborts with following truntime error: > lpcfg_load: refreshing parameters from /etc/samba/smb.conf > Processing section "[global]" > Can't find include file registry > pm_process() returned No > Traceback (most recent call last): > File "/usr/bin/samba-gpupdate", line 77, in <module> > lp = sambaopts.get_loadparm() > File "/usr/lib/python3.10/site-packages/samba/getopt.py", line 92, > in get_loadparm > self._lp.load_default() > RuntimeError: Unable to load default file > > It seems that the Python load module is not aware of Samba registry > configuration and the required settings in smb.conf:include > registry. > Are there any workarounds available?Please post your smb.conf Rowland
On 7/16/22 6:15 PM, Thomas de la Tourette via samba wrote:> Samba 4.16.2 > samba-gpupdate --forceaborts with following truntime error: > lpcfg_load: refreshing parameters from /etc/samba/smb.conf > Processing section "[global]" > Can't find include file registry > pm_process() returned No > Traceback (most recent call last): > ? File "/usr/bin/samba-gpupdate", line 77, in <module> > ??? lp = sambaopts.get_loadparm() > ? File "/usr/lib/python3.10/site-packages/samba/getopt.py", line 92, in get_loadparm > ??? self._lp.load_default() > RuntimeError: Unable to load default file > > It seems that the Python load module is not aware of Samba registry configuration and the required settings in smb.conf:include = registry. > Are there any workarounds available?Samba python doesn't work with a registry smb.conf. It's not just a problem with samba-gpupdate, it's a problem with all samba python commands. IIRC, somebody submitted patches to fix this, although I don't think it has been merged. -- *David Mulder* Labs Software Engineer, Samba SUSE 1221 Valley Grove Way Pleasant Grove, UT 84062 dmulder at suse.com http://www.suse.com
On 7/16/22 6:15 PM, Thomas de la Tourette via samba wrote:> Samba 4.16.2 > samba-gpupdate --forceaborts with following truntime error: > lpcfg_load: refreshing parameters from /etc/samba/smb.conf > Processing section "[global]" > Can't find include file registry > pm_process() returned No > Traceback (most recent call last): > ? File "/usr/bin/samba-gpupdate", line 77, in <module> > ??? lp = sambaopts.get_loadparm() > ? File "/usr/lib/python3.10/site-packages/samba/getopt.py", line 92, in get_loadparm > ??? self._lp.load_default() > RuntimeError: Unable to load default file > > It seems that the Python load module is not aware of Samba registry configuration and the required settings in smb.conf:include = registry. > Are there any workarounds available?I couldn't find a existing solution, so I wrote one: https://gitlab.com/samba-team/samba/-/merge_requests/2624 This is a simple work around. Since the s4 param doesn't support registry configuration, I've switched samba-gpupdate to only use the s3 param. Hopefully this passes CI without any issues. -- *David Mulder* Labs Software Engineer, Samba SUSE 1221 Valley Grove Way Pleasant Grove, UT 84062 dmulder at suse.com http://www.suse.com