[Samba] any reliable way to discover Windows hostname over SMB2+?

Jason Haar jason_haar at trimble.com
Thu Jul 13 20:25:22 UTC 2017

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 | 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)


Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +1 408 481 8171
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

More information about the samba mailing list