Getting the name of a Windows PC from Solaris

2007-12-25 9:25:00

Dear All,

Thanks to all those who responded to my query about how to find out

the NetBIOS name of a Windows PC from Solaris. They include:-

Jim Harmon <jharmon@telecnnct.com>

Craig Whytock <cwhytock@cims.co.uk>

Michael Pavlov <misha@ml.com>

Joel Lee <jlee@thomas.com>

"Per Boussard, ERA/T/ED" <per@era-t.ericsson.se>

"DJEVANS.AU.ORACLE.COM" <DJEVANS@au.oracle.com>

Karl Vogel <vogelke@c17mis.region2.wpafb.af.mil>

Mark Belanger <mark_belanger@ltx.com>

"Mark 'Hex' Hershberger" <mah@eecs.tulane.edu>

Answers varied from using nslookup through SMTP to tcp-dump. However,

the correct answer, (and Mark 'Hex' Hershberger was closest here), was

to use the utility nmblookup from the samba suite.

The knack is to use the very latest Samba 1.9.19p2, which has additional

functionality in the nmblookup command.

Use nmblookup -r -A 123.123.123.123, which will give you a number of

names. The machine name is the first one with <00> in the line. Note

that this command needs to bind to port 137, so you will either need to

be root, or make the script setuid root.

This occasionally does not work, giving the reply No status response,

but most of the time it's fine, and it does the job nicely for me.

Thanks for all who helped.

Matthew.


--
-------------------------------------------------------------------
Matthew Atkinson Phone: +44 (0) 1904 462120
Sun Systems Technical Administrator Fax: +44 (0) 1904 462111
Information Systems Team
Central Science Laboratory E-mail: m.atkinson@csl.gov.uk
Sand Hutton, York, Yo4 1LZ, England
-------------------------------------------------------------------

Comments

Got something to say?

You must be logged in to post a comment.