On 6/5/23 12:28 AM, Anderson Sampaio Mello via samba
wrote:> Greetings samba team.
>
> There is a problem for file policy type GPOs for Linux clients. to copy
> files to linux clients with winbind.
>
> The problem is that when a file already exists in the linux client with
> winbind and joined to the domain, the GPO does not copy the file from the
> samba server to the destination linux client, that is, it does not replace
> the file in the destination if it already exists in the linux client .
>
> For the GPO to work, the file must not exist on the linux client.
>
> Does anyone know the cause of the problem?
The problem is that it is written to do this:
```python
if os.path.exists(target):
??? log.warn('Target file already exists', target)
??? continue
```
If you call samba-gpupdate with debug, you'll see this warning. This
behavior has actually changed in Samba 4.18. Since 4.18, the target file
will be overwritten if it already exists. As a work around, you could
remove that check in the vgp_files_ext.py CSE.
--
David Mulder
Labs Software Engineer, Samba
SUSE
1221 S Valley Grove Way, Suite 500
Pleasant Grove, UT 84062
(P)+1 385.208.2989
dmulder at suse.com
http://www.suse.com