[Samba] samba-tool gpo listall error

Jonathan Kreider jonathan.kreider at gmail.com
Tue Nov 10 22:39:32 UTC 2020


More problems...

So cat /etc/resolv.conf yields nothing.
root at ad2:~# ll /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Jun 17  2018 /etc/resolv.conf ->
../run/systemd/resolve/stub-resolv.conf

Shows a broken link. Since this is Ubuntu 18.04 with systemd and the
stub-resolv.conf missing, I'm lost. I'll test my google fu to try to figure
this out, but if someone can point me in the right direction, I'd be most
grateful.

I presume that the python code gets its info from /etc/resolv.conf rather
than a DNS query? (Since ping works...)

Thanks,
Jonathan Kreider


On Tue, Nov 10, 2020 at 4:00 AM Rowland penny via samba <
samba at lists.samba.org> wrote:

> On 09/11/2020 22:51, Jonathan Kreider via samba wrote:
> > 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
>
> This is probably either a missing package or a dns problem, as it works
> for myself on a DC or a Unix domain member.
>
> Does the DC point to itself as the first nameserver in /etc/resolv.conf ?
>
> Rowland
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list