Results 1 to 3 of 3

Thread: findout windows hostnames using ipaddress

  1. #1

    Smile findout windows hostnames using ipaddress

    Dear All,

    I am writing a bash script to find out hostname(machine name of win xp,2000 and 98 local area net work which doesn't have dns name resolution configured) form ip address. I've tried ping, traceroute and other various utilities, but unable to do that.

    In windows, dos
    ping -a <ip address>
    gives the hostname of the ip address owned by machine. But in linux, bash I've tried, couldn't found in man pages.
    Is there any compatible command for that to accomplish my goal?

    Is there any way to read header of the ip packet and get any information related to hostname after ping to that ip address?

    Or any good way of doing that?

    Pls help me to solve this problem in bash?

    Last edited by lasanthaindika; 12-24-2007 at 06:07 AM. Reason: typing mistake

  2. #2
    Join Date
    Apr 2004
    Juneau, Alaska
    This information may be available on your router if you have access to it whether using static IP's or DHCP.

    Another possibility would be Samba configuration files if the network is using Samba.

    Just a couple of shots in the dark !

  3. #3
    Oh thanks for the interest.....

    I have found a shell command

    nmblookup -A <ipaddr>
    Which gives the machine hostname of the ipaddress. Then I can cut the relevant part from that.

    Any way thanks for you.

Similar Threads

  1. Getting hostnames (DNS) from router?
    By CootCraig in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 04-12-2011, 03:04 PM
  2. Upgrading Windows 2000 Server to Windows 2003 Serv
    By dbrewer in forum Windows - General Topics
    Replies: 3
    Last Post: 12-18-2006, 12:53 PM
  3. Dual boot Windows and Linux using NTLDR (Windows Bootloader)
    By BeoR in forum Linux - General Topics
    Replies: 11
    Last Post: 02-18-2005, 10:02 AM
  4. What are the hostnames of your PCs
    By Black666 in forum General Chat
    Replies: 38
    Last Post: 05-11-2002, 05:38 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts