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
    Code:
    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?

    Thanks,
    Last edited by lasanthaindika; 12-24-2007 at 05:07 AM. Reason: typing mistake
    LASANTHA

  2. #2
    Associate
    Join Date
    Apr 2004
    Location
    Juneau, Alaska
    Posts
    31
    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

    Code:
    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.
    LASANTHA

Similar Threads

  1. List of fixes included in Windows XP SP2
    By regix in forum Windows - General Topics
    Replies: 6
    Last Post: 01-03-2005, 10:44 PM
  2. ISA Server on Windows Server 2003
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-01-2005, 08:49 PM
  3. Windows CE FAQ
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-01-2005, 02:00 AM
  4. Reinstall Dial-Up Networking and TCP/IP
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-01-2005, 01:07 AM
  5. How to install or upgrade to Windows XP
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 12-31-2004, 10:35 PM

Bookmarks

Posting Permissions

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