Possible Duplicate:
Where is nmblookup in Lion?

In Snow Leopard, I used to use the command nmblookup -U -R domainPC | grep '<00>' | awk '{print $1}' Blindly upgrading to Lion, I didn't realize that Apple removed SMB I am now in trouble.

Is there anyway to replace it with an alternative? I see there is smbutil lookup [hostname], but I am not sure if I can add a gateway like I did with nmblookup.

marked as duplicate by Nathan Greenstein Jan 7 '12 at 21:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    This question has been asked (and answered) here: apple.stackexchange.com/q/24972/10193 – mluisbrown Jan 6 '12 at 12:30
  • Actually it goes beyond the other question, as it asks how to specify the host to query... But then again the man page answers that - anyway, I want the bounty ;) which was like 100 points – iolsmit Jan 8 '12 at 19:55

Did you have a look at the man page?

Shouldn't smbutil lookup [-w host] name do the job?

 Global options are as follows:
 -h      Print a short help message.
 -v      Verbose output.
 The commands and local options are:
 help command
         Print usage information about command.
 lookup [-w host] [-t node_type] [-e] name
         Resolve the given name to an IP address.  The NetBIOS name server can be directly specified via
         the -w option. The NetBIOS name type can be specified via the -t, the default is to lookup file
         servers. For a complete list of name type please see "http://support.microsoft.com/kb/163409".
         The NetBIOS names will be unpercent escaped out if the -e option is specified.
 status [-ae] hostname
         Resolve given hostname (IP address or DNS name) to NetBIOS workgroup and system name. All Net-
         BIOS names will be displayed if the -a option is specified. All NetBIOS names will be percent
         escaped out if the -e option is specified.

For me this worked (replacing your example):

smbutil lookup -w -e domainPC | awk '/IP address of/ {print $5}'

  • The -R says it is illegal when I run it although smbutil lookup [-w host] name does work – Jon Jan 8 '12 at 14:29
  • Sorry, copy/paste error: should be -e instead of -R, modified the answer – iolsmit Jan 8 '12 at 17:15

Not the answer you're looking for? Browse other questions tagged .