Querying WINS server
Baldur Norddahl
bbn at dark.x.dtu.dk
Fri Dec 5 17:29:22 GMT 1997
Quoting David Terrell (dterrell at obscurity.net):
> Forgive me if this is a stupid question, but I couldn't find it in the
> mailing list archives, the faq, the included documentation, or the source,
> so I figured I'd at least ask.
I actually posted a patch to smbclient long time ago, but it didn't get much
attention.
> I'd like to query a WinNT wins server from my linux box, and find the
> IP address of a machine that is registered there. Ideally, I'd like
> to just plug that into smbclient. As it stands, when I type
> smbclient //server/share, and the server is not on my local net, smbclient
> can't find it. It doesn't appear to check the WINS server at all.....
>
> Is there a utility I'm missing somewhere?
If the DNS address of the WINS server is danbo.ostenfeld, and you are
looking for the IP of a server named K1800, this does it:
[root at carlsberg /root]# nmblookup k1800#20 -B danbo.ostenfeld
Added interface ip=192.38.212.1 bcast=192.38.216.1 nmask=0.0.0.0
Sending queries to 192.38.216.1
192.38.215.248 k1800
Alternative you can apply my patch to smbclient, which makes smbclient do
the above automaticaly if there is a WINS server defined in smb.conf. I seem
to have lost my own patch, so you will have to search the archive for it.
Baldur
More information about the samba
mailing list