PDA

View Full Version : [ubuntu] How can I find a windows hostname on the network via IP with Ubuntu?



Roasted
January 5th, 2009, 10:35 PM
Long story short... at work (school district) we have a full blown Windows network. (:() I however have a spare computer set up that runs Ubuntu so I can use various utilities on it.

We found a student who was instant messaging. *tisk tisk* and we have their IP. We ran ping -a on the IP but it didn't pull the host name as it should.

Using Ubuntu Intrepid, is there any way I can dig up the host name from the IP that I have?

capscrew
January 5th, 2009, 10:44 PM
We ran ping -a on the IP but it didn't pull the host name as it should.How does that work?

Quoting the ping man page:
ping -a Audible ping.


Try this:
arp -a <ip_address>

Copernicus1234
January 5th, 2009, 10:47 PM
Also try the host command:



host <ip>

Roasted
January 5th, 2009, 11:52 PM
if you go to command prompt in windows and type

ping -a 10.0.0.1

It'll give you the host name of 10.0.0.1 + ping it 4 times as usual.

When I pinged -a myself, it gave me my host name.
When I pinged -a the IP in question, it didn't give me a host name... which is what I need.

Roasted
January 5th, 2009, 11:54 PM
Also try the host command:



host <ip>



Like this?

jason@jason-intrepid:~$ host 192.168.1.100
Host 100.1.168.192.in-addr.arpa. not found: 3(NXDOMAIN)
jason@jason-intrepid:~$



192.168.1.100 should be = "Curtdesktop"