can't find windows machines by host name

Hello all

I have recently set up 11.2 and I am really having a lot of fun. (I know that’s the slogan, but in my case it is true.)

I have been able to connect to a windows share using samba, but only if I use the IP address. I cannot do it via the host name.

I tried ping with the same results. The linux machine can’t ping either of the windows machines using the host names. The windows machines can ping each other using host names, but not the linux machine. Everything pings everything using IP addresses, and the rest of the network stuff seems to work fine.

So, I assume that windows has some tricky (nonstandard?) way to share this information amongst the computers on the network. I use DHCP to set the addresses, so I hate to hard-code the information in hosts files or a DNS server.

How do I setup a DNS server or something similar that works with DHCP so that as I add things or addresses are reassigned the hosts can be found correctly?

Thanks

On Tue November 24 2009 10:26 pm, az10sbum wrote:

>
> Hello all
>
> I have recently set up 11.2 and I am really having a lot of fun. (I
> know that’s the slogan, but in my case it is true.)
>
> I have been able to connect to a windows share using samba, but only if
> I use the IP address. I cannot do it via the host name.
>
> I tried ping with the same results. The linux machine can’t ping
> either of the windows machines using the host names. The windows
> machines can ping each other using host names, but not the linux
> machine. Everything pings everything using IP addresses, and the rest
> of the network stuff seems to work fine.
>
> So, I assume that windows has some tricky (nonstandard?) way to share
> this information amongst the computers on the network. I use DHCP to
> set the addresses, so I hate to hard-code the information in hosts files
> or a DNS server.
>
> How do I setup a DNS server or something similar that works with DHCP
> so that as I add things or addresses are reassigned the hosts can be
> found correctly?
>
> Thanks
>
>
az10sbum;
These two HowTos by Swerdna should help:
http://opensuse.swerdna.org/suselanprimer.html
and
http://opensuse.swerdna.org/susesambaserver.html
Make sure that the Global section of /etc/samba/smb.conf has the paramater:
name resolve order = bcast host lmhosts

Also verify that nmbd is running. To check, open a terminal window and enter:


rcnmb status

If you still need help, please post the contents of your /etc/samba/smb.conf.
You can conceal with substitute values any sensitive information such as
public IPs.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

I’d also edit the file /etc/nsswitch.conf and change the line that looks like this:

hosts:  files mdns4_minimal [NOTFOUND=return] dns

to this:

hosts:  files mdns4_minimal [NOTFOUND=return] wins dns

and reboot afterwards

MS uses netbios to pass dns names back and forth on a LAN, it broadcast it to everyone. you shouldn’t have to edit anything in your samba to connect to MS shares. Try this as an experinment … trun off your firewall on your suse box, then search your network and you’ll find netbios is working just fine (you can ping names instead of IP addresses). if you need a firewall enabled on your PC, then open netbios port on it and you’re cooking with gas. there’s a drop down box for a netbios server, or you can just open port 137 - 139 (same thing). this will allow you to ping your MS boxes by name instead of IP.

To ping linux from windows, you’re going to need to turn on smb and nmb service:

The nmbd daemon

The nmbd server daemon understands and replies to NetBIOS name service requests such as those produced by SMB/CIFS in Windows-based systems. These systems include Windows 95/98/ME, Windows NT, Windows 2000, Windows XP, and LanManager clients. It also participates in the browsing protocols that make up the Windows Network Neighborhood view. The default port that the server listens to for NMB traffic is UDP port 137.

The nmbd daemon is controlled by the smb service.

you shouldn’t have to config anything, just turn it on so it’s running and you’ll start broadcasting your hostname just like a windows box.

commands you’ll need : rcsmb start, rcnmb start, /sbin/chkconfig smb on, /sbn/chkconfig nmb on

copy and paste this into a terminal it’ll ask you for a password (use your root password)

su -c “rcsmb start && rcnmb start && /sbin/chkconfig smb on && /sbin/chkconfig nmb on”

to view a list of running services/daemon’s run /sbin/chkconfig --list you should see smb and nmb set to on for runlevel 3 - 5

you’ll need to run these as root or under a sudo command if you run them separately. let me know if you get stuck… :smiley: