[Samba] any reliable way to discover Windows hostname over SMB2+?
Rowland Penny
rpenny at samba.org
Thu Jul 13 21:04:25 UTC 2017
On Fri, 14 Jul 2017 08:25:22 +1200
Jason Haar <jason_haar at trimble.com> wrote:
> On Fri, Jul 14, 2017 at 4:19 AM, Rowland Penny via samba <
> samba at lists.samba.org> wrote:
>
> > On Thu, 13 Jul 2017 11:04:30 -0500
> > I take it as you are talking about smbclient, this is on a Unix
> > machine, so how about:
> >
> > host -i 192.168.0.2 | awk '{print $NF}' | awk -F '.' '{print $1}'
> >
> > If you want the FQDN, just remove the last part.
> >
>
> "host" invokes DNS - which I did say is awful (for us), so no. I
> really need a realtime lookup instead of a "cached" lookup (which DNS
> and DHCP logs are)
>
> Basically I need something for when all else has failed. And even
> then I adamantly refuse to use DNS PTR records - they are that bad
> (for us)
>
I see from one of your other post that you are using Centos 6, it would
be a good idea to upgrade Samba and it will probably be better to
compile it yourself, so start with the latest RC candidate. It would
also be a good idea to fix your DNS ;-)
Rowland
More information about the samba
mailing list