Results 1 to 3 of 3
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 ...
- 12-24-2007 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 18
findout windows hostnames using ip address
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, dosgives the hostname of the ip address owned by machine. But in linux, bash I've tried, couldn't found in man pages.Code:ping -a <ip address>
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,
- 12-24-2007 #2
try nslookup:
nslookup <ipaddr>
is that useful?- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 12-24-2007 #3Just Joined!
- Join Date
- Dec 2007
- Posts
- 2
Hello,
if DNS is not configured in the network, samba command nmblookup may help:
nmblookup - NetBIOS over TCP/IP client used to lookup NetBIOS names
nmblookup
for example:
nmblookup -A 10.10.10.1
hope this helps.


Reply With Quote