image
image

Go Back   macosx.com > Mac Help Forums > Networking & Compatibility

Reply
 
Thread Tools
  #1  
Old December 1st, 2004, 02:21 PM
Registered User
 
Join Date: Aug 2002
Location: Redondo Beach, CA
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
rubicon is on a distinguished road
Cannot resolve Windows host names from Terminal

I regularly connect my Mac to my Windows computer using Finder. However, I can't connect to the Windows computers using Terminal, Chicken of the VNC, or Remote Desktop Client - the hostname won't resolve. It works fine if I use the IP address. Problem is, I use DHCP at home and don't want to use static IP.

Doesn't anyone know how to get name resolution working? Why does it work in Finder but nowhere else?

I'm running OS X 10.3.6 using a Linksys WRT54G and trying to ping, VNC, or RDP to an XP host.

TIA.
__________________
Titanium PowerBook G4 15" / 800 MHz / 1,000 MB / 40 GB / AirPort / Tiger 10.4.9
MacBook Core Duo / 2.0 GHz / 512 MB / 60 GB / Airport Extreme / Tiger 10.4.9
Reply With Quote
  #2  
Old December 1st, 2004, 04:34 PM
rbb rbb is offline
Registered User
 
Join Date: Oct 2004
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
rbb is on a distinguished road
You will need a way to resolve names to IP's. I use a FreeBSD machine with named running, then dhcpd that has the mac addresses of the specific machines, and gives them specific IP's. My DNS server resolves the names.

You can use /etc/hosts as well.
Reply With Quote
  #3  
Old December 1st, 2004, 07:21 PM
Registered User
 
Join Date: Aug 2002
Location: Redondo Beach, CA
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
rubicon is on a distinguished road
Righto, but what I don't understand is how Finder is resolving the names but other TCP/IP applications are not (such as RDC, VNC). It seems I need the Mac to lookup the DHCP client addresses from the local DHCP server.

Interestingly, my SuSE install can resolve DHCP client addresses just fine. It's only OS X having a problem.
__________________
Titanium PowerBook G4 15" / 800 MHz / 1,000 MB / 40 GB / AirPort / Tiger 10.4.9
MacBook Core Duo / 2.0 GHz / 512 MB / 60 GB / Airport Extreme / Tiger 10.4.9
Reply With Quote
  #4  
Old December 1st, 2004, 08:02 PM
scruffy's Avatar
Notorious Olive Counter
 
Join Date: Dec 2000
Location: Soviet Canuckistan
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
scruffy is on a distinguished road
The Finder is probably configured to use wins resolution or something similar in the Finder. What happens if you try "nmblookup windows-box-name" in terminal?

The trick is to figure out how to configure hostname resolving order, and to see if you can set wins lookup as a step...
__________________

What is the robbing of a bank compared to the founding of a bank?
-- Bertold Brecht
Reply With Quote
  #5  
Old December 1st, 2004, 08:20 PM
Registered User
 
Join Date: Aug 2002
Location: Redondo Beach, CA
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
rubicon is on a distinguished road
nmblookup worked and gave me the IP address.

Any thoughts about the hostname resolving order and getting WINS in there?
__________________
Titanium PowerBook G4 15" / 800 MHz / 1,000 MB / 40 GB / AirPort / Tiger 10.4.9
MacBook Core Duo / 2.0 GHz / 512 MB / 60 GB / Airport Extreme / Tiger 10.4.9
Reply With Quote
  #6  
Old December 13th, 2004, 04:19 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montrιal
Posts: 2,172
Thanks: 0
Thanked 0 Times in 0 Posts
michaelsanford is on a distinguished road
An idea, why not add to ~/.bashrc (or whatever login script you need) something like:
export WINDOWS-BOX-1=`nmblookup hostname`

Then you can just log in using something like ssh user@$WINDOWS-BOX-1
__________________
michaelsanford.com • Blog • Twitter • Tumblr • LinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0

Last edited by michaelsanford; December 13th, 2004 at 04:27 PM.
Reply With Quote
  #7  
Old February 16th, 2008, 09:07 AM
Registered User
 
Join Date: Nov 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
deadeyes is on a distinguished road
This is all great, but I dont understand why it does not work.

This is a workaround, and I dont like those.
I need THE fix for this.

I know in linux you can use /etc/nsswitch and put in the different methods of host resolution like this:
hosts: files winbind dns

I tried it but did not work.
Reply With Quote
  #8  
Old February 16th, 2008, 09:14 AM
nixgeek's Avatar
Mac of the SubGenius! :-)
 
Join Date: Jan 2004
Location: Miami, FL
Posts: 7,559
Thanks: 15
Thanked 89 Times in 73 Posts
nixgeek has a spectacular aura aboutnixgeek has a spectacular aura aboutnixgeek has a spectacular aura about
You could add the entry in your /etc/hosts file for that one Windows computer, or you could run a DNS server internally to resolve only the internal addresses. I have the same issues with my GNU/Linux systems when trying to access a Windows computer using the hostname. At work, I've modified the /etc/resolv.conf file on my GNU/Linux computers so that they could resolve the names to the IP addresses of the Windows computers. I've also modified the /etc/nsswitch.conf file to also search hostnames through DNS.

In Mac OS X, I've usually just added the DNS nameservers manually from the Network pane in System Preferences for the Macs at work if they don't get it from the DHCP server.

EDIT: Just noticed that you tried exactly what I mentioned in GNU/Linux, so you are obviously familiar with this. If you're using Tiger or earlier, remember that most everything is managed by NetInfo, so you might have to launch NetInfo Manager to make the changes. Be careful, though.....you can make some dire mistakes in there if you don't know what you're doing.
__________________
• Apple iMac G5 17" (2 GHz G5) - Mac OS X 10.4.11
• Apple Macintosh Quadra 650 (33 MHz MC68040) - Mac OS 8.1
• Apple PowerBook Duo 230 (33 MHz MC68030) - System 7.1
• "JHVH-1" (2 GHz AMD Athlon XP 2400+) - Slackware 12.1
• "Kidbuntu" (2.8 GHz Celeron D 335) - Ubuntu 8.04
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 12:00 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.