Come to think of it Phillip's answer isn't bad either in many cases. Win2K domains don't even use WINS anymore, everything is DNS. Of course if you're not in a 2K domain that's not going to help you.

The answer you want, BTW, is the first <00> entry in the list that's returned. A regex should be trivial.

I have read that this doesn't always work. Some NT clients don't answer properly, etc.

Andrew Jorgensen wrote:
I think what you're looking for is:

nmblookup -A <IP Address>

This will return a bunch of stuff. It should be fairly obvious which is the name you're looking for. You could then write a wrapper to pull off just the answer you want.

David Smith wrote:

If I've got an IP address, i.e. 10.0.0.5, and I want to do a reverse lookup to find the Windows name, i.e. "mydesktop", how would I do that on Linux?

--Dave


____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://phantom.byu.edu/cgi-bin/mailman/listinfo/uug-list

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to