[Samba] samba-tool gpo listall error

Jonathan Kreider jonathan.kreider at gmail.com
Mon Nov 9 22:51:26 UTC 2020


Greeting,

I'm trying to figure out how to use GPOs in my samba AD. There's an awful
lot that I don't know. But along the way of learning I found this:
https://wiki.samba.org/index.php/GPO_Backup_and_Restore

And I decided to try the "samba-tool gpo listall" command that I found
there to confirm that samba thinks it has the GPOs that I think it does.

But I get this error:

root at ad2:~# samba-tool gpo listall
ERROR(runtime): uncaught exception - ('Could not find a DC for domain',
NTSTATUSError(3221225524, 'The object name is not found.'))
  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/gpo.py", line 464, in
run
    self.url = dc_url(self.lp, self.creds, H)
  File "/usr/lib/python3/dist-packages/samba/netcmd/gpo.py", line 128, in
dc_url
    raise RuntimeError("Could not find a DC for domain", e)

I'm using Louis' packages...
root at ad2:~# smbstatus
Samba version 4.11.13-Debian

root at ad2:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

I've upgraded to 4.11.16 and the problem remains:

root at ad2:~# samba-tool gpo listall
ERROR(runtime): uncaught exception - ('Could not find a DC for domain',
NTSTATUSError(3221225524, 'The object name is not found.'))
  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/gpo.py", line 464, in
run
    self.url = dc_url(self.lp, self.creds, H)
  File "/usr/lib/python3/dist-packages/samba/netcmd/gpo.py", line 128, in
dc_url
    raise RuntimeError("Could not find a DC for domain", e)

root at ad2:~# smbstatus
Samba version 4.11.16-Debian

I thought it might be DNS, but ping works:

root at ad2:~# ping ad2
PING AD2.samdom.com (192.168.1.12) 56(84) bytes of data.
64 bytes from AD2.samdom.com (192.168.1.12): icmp_seq=1 ttl=64 time=0.067 ms

Where should I look next?

Thanks,
Jonathan Kreider


More information about the samba mailing list