How to know " Window's machine IP address and hostname " from ubuntu in the same network ?
hello friends,
recently I am looking for a fix on the following problem : * I wanted to know my windows machine's IP address ( which I have got by using arp-scan <IP address range starting from 0>/20. I got the output as its ip address and the mac id. but , it was not what I was looking for. I wanted to know its hostname alongwith IP address. but, it comes up only with ip and mac id. so, naturally its a stuck to my curiosity, I know my expert friends can easily do it, but want to know how ? pls, let me know about it. |
|
Quote:
http://www.linuxquestions.org/questi...rk-4175593904/ If you want to know the host name, that's what DNS is for...do those machines have entries? If not, then you have two choices: enter them into your local network's DNS server, or put them in the machines hosts file. And don't use text-speak..it's "please" not "pls". |
Also, in that thread TB0ne linked to, Turbocapitalist suggested nmap and its gui-frontend zenmap, which is a very cool tool, imo. Have you tried it yet? nmap is an awesome tool for this kind of stuff. I'll do hand-holding here. Try this command:
Code:
root@computer:~# nmap -sn 192.168.0.0/24 |
user name of the windows machine from linux
Quote:
I think I was unable to clear my question. suppose, my six linux machines are on same network. I used angry ip, and it gave me the user name alongwith IP address. but, now, If a windows machine is on the same network, then what to do ? ANGRYIP scanner is found unable to scan the username of that windows machine. but, I need to know the user name of that windows machine, now tell me, what steps should I follow ? thanks in advance. |
Quote:
AGAIN...what you described in your other thread wasn't clear, and you were asked for details, and didn't provide them. Unless the hosts names are set via DHCP and/or via DNS, there will BE no host name to return. Either set up your Windows machines to set these things accordingly, set up a DNS server and enter them, or set up DHCP to set up the host names. No other choices...pick one. |
You will get the hostname of Windows machine in lan network by this command assuming your network address is 192.168.1.0/24. Replace range with your own subnet.
Code:
sudo nbtscan -r 192.168.1.0/24 |
Quote:
|
Quote:
|
Quote:
Yes, netbios may be turned on by default, but again, you mention how broken it is, by saying it truncates the hostname. Turning it off and using the modern standards is better than trying to use old junk. |
thanks, it works !
Quote:
yes, it was turned off by default, after enabling it, windows machine is under listing, but with the following command: sudo nbtscan 192.168.1.0/....., without ==> ( -r ) thank you sir. |
All times are GMT -5. The time now is 01:03 PM. |