Hello, Is there *any* way to reliablily determine the NetBIOS name of a computer when you only know their IP address? I know it is very easy to find the IP address from the NetBIOS name, but I can't seem to find any way of getting a NetBIOS name from an IP.. James deBoer (jdeboer@scsinternet.com)
You can run it in windows nbtstat -a computername or nbtstat -A xxx.xxx.xxx.xxx Hope it helps On Thu, 27 Dec 2001, James deBoer wrote:> Hello, > > Is there *any* way to reliablily determine the NetBIOS name of a computer > when you only know their IP address? I know it is very easy to find the IP > address from the NetBIOS name, but I can't seem to find any way of getting a > NetBIOS name from an IP.. > > James deBoer > (jdeboer@scsinternet.com) > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba >
Hrm, sorry.. I found a reference to nbtstat earlier. However, is it possible to do the same with GNU/Linux? On December 27, 2001 10:01 pm, Alexander Saers wrote:> You can run it in windows > > nbtstat -a computername > or > nbtstat -A xxx.xxx.xxx.xxx > > Hope it helps >
Have you tried nmblookup -T xxx.xxx.xxx.xxx then :) /Alexander On Thu, 27 Dec 2001, James deBoer wrote:> Hrm, sorry.. I found a reference to nbtstat earlier. However, is it possible > to do the same with GNU/Linux? > > On December 27, 2001 10:01 pm, Alexander Saers wrote: > > You can run it in windows > > > > nbtstat -a computername > > or > > nbtstat -A xxx.xxx.xxx.xxx > > > > Hope it helps > > >
Err, that should be nmblookup -A xxx.xxx.xxx.xxx -T can be used to lookup the name with DNS, but wrong tool for the wrong job comes to mind :) On Fri, 28 Dec 2001, Alexander Saers wrote: Have you tried nmblookup -T xxx.xxx.xxx.xxx then :) /Alexander On Thu, 27 Dec 2001, James deBoer wrote:> Hrm, sorry.. I found a reference to nbtstat earlier. However, is it possible > to do the same with GNU/Linux? > > On December 27, 2001 10:01 pm, Alexander Saers wrote: > > You can run it in windows > > > > nbtstat -a computername > > or > > nbtstat -A xxx.xxx.xxx.xxx > > > > Hope it helps > > >
James, Yes! You can do IP to NetBIOS on Linux - Samba does it all the time! You can also do NetBIOS Name to IP translation thanks to WINS. Here's how to do the WINS thing. 1) Set up your Samba smb.conf file with a valid WINS resolver method, either: a) wins server = xxx.xxx.xxx.xxx Which of course will point to your WINS server (assuming you have one) _OR_ b) wins support = Yes Which make Samba your WINS server. NOTE: Make sure that whatever method you use, ALL your MS Windows clients are configured either manually, or via DHCP, to point to your WINS server. Now you need to configure your Linux system: 2) In /etc/nsswitch.conf set: hosts: files dns wins If you want to use NetBIOS names ahead of DNS lookups then have: hosts: files wins dns 3) In /etc/resolv.conf make sure you have a valid entry like the following IF you keep the "dns" entry in the hosts: line in /etc/nsswitch.conf nameserver = xxx.xxx.xxx.xxx Now ping an MS Windows box as follows: ping "Windows_Machine_Name" You can also use the Samba utility "nmblookup" as well as "smbclient" to see you MS Windows machines. nmblookup "Windows_Machine_Name" smbclient -L "Windows_Machine_Name" -U% If you run Samba as a WINS server you can see the WINS registrations in the file /var/locks/samba/wins.dat if you really want to. Hope this helps. - John T. James deBoer wrote:> Hrm, sorry.. I found a reference to nbtstat earlier. However, is it > possible > to do the same with GNU/Linux? > > On December 27, 2001 10:01 pm, Alexander Saers wrote: >> You can run it in windows >> >> nbtstat -a computername >> or >> nbtstat -A xxx.xxx.xxx.xxx >> >> Hope it helps-- John H Terpstra Email: jht@samba.org An argument of minds: "Please help me to find the intellect in Intellectual Property" "Not me, I can't find the property in it either!"