[Samba] samba 4.13: backup script: FileNotFoundError

James Dingwall james-samba at dingwall.me.uk
Mon Nov 22 08:36:56 UTC 2021


Hi,

Ubuntu 20.04 recently updated samba from 4.11 to 4.13.  Since then the backup
script has started failing:

running backup on dirs: /var/lib/samba/private /var/lib/samba /etc/samba
ERROR(<class 'FileNotFoundError'>): uncaught exception - [Errno 2] No such file or directory: '/var/lib/samba/dfs/netlogon'
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 186, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 1105, in run
    if any(os.path.samefile(full_path, file) for file in all_files):
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 1105, in <genexpr>
    if any(os.path.samefile(full_path, file) for file in all_files):
  File "/usr/lib/python3.8/genericpath.py", line 100, in samefile
    s1 = os.stat(f1)

Assuming that I set my DFS up correctly I think the cause is that 'netlogon'
is a dangling link:

$ ls -l /var/lib/samba/dfs/netlogon
lrwxrwxrwx 1 root root 43 Mar 26  2021 /var/lib/samba/dfs/netlogon -> msdfs:dc0\netlogon,dc1\netlogon

Should the directory backup script handle this case or should I move the [dfs]
share?

Thanks,
James



More information about the samba mailing list