[Samba] samba-tool gpo listall error
L.P.H. van Belle
belle at bazuin.nl
Wed Nov 11 07:44:18 UTC 2020
You have a few.
But since you disabled the systemd-resolved service.
rm /etc/resolv.conf
echo "search $(hostname -d)" |sudo tee -a /etc/resolv.conf
echo "nameserver $(hostname -i)" |sudo tee -a /etc/resolv.conf
echo "nameserver 8.8.8.8" |sudo tee -a /etc/resolv.conf
Would do it, and add extra dc's there ip as nameserver if needed offcourse.
Ps. On this.
> However, since this is an AD DC, I want samba to provide the
> DNS. So I've disabled systemd-resolved.service.
Also works fine with systemd-resolved enable.
But lets leave it out for today. ;-)
Greetz,
Louis
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
> Jonathan Kreider via samba
> Verzonden: dinsdag 10 november 2020 23:45
> Aan: Rowland penny
> CC: samba at lists.samba.org
> Onderwerp: Re: [Samba] samba-tool gpo listall error
>
> My google fu quickly turned up this info:
> https://unix.stackexchange.com/questions/564673/wheres-my-stub
> -resolve-conf-missing
>
> which suggests that I need to start systemd-resolved.service.
>
> However, since this is an AD DC, I want samba to provide the
> DNS. So I've
> disabled systemd-resolved.service.
>
> I suppose that the anti-systemd crowd will go into fits about
> this. Does
> anyone have a solution?
>
> Thanks,
> Jonathan Kreider
>
>
> On Tue, Nov 10, 2020 at 5:39 PM Jonathan Kreider
> <jonathan.kreider at gmail.com>
> wrote:
>
> > 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
> >>
> >
> --
> 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