Resolving Windows Hostnames from a Linux Client

So far my new attempt at Linux is mostly working, except for two problems (the other of which I just posted (Connecting through Samba to a Windows Share past XP's SP2 firewall)

From my Linux box (Fedora Core 2) I can see each of the other systems on the LAN through Konqueror's LAN Browser (Is their a better way? Yet to find one...)  The only problem is that they all come up as IP addresses insted of Hostnames. I can ping by IP, but not by name.

All of the systems in the network have their IP's assigned by DHCP from my DSL router. And I don't want to assign static IP's to each system. Freinds come over and plug in, systems come and go, it all needs to be seamless.

Through Windows everything works perfectly, I plug a windows box into my network and it can see and access all shares and systems by name, without a system acting as a DNS server. Then Linux comes along, and after much googling, and a visit to some of the Linux Forums, I'm told my options are to either:

Set every system a static IP and list them all in /etc/resolv.conf As I'm sure you'll agree this isn't practical.


Set up one of the systems as a DNS server to take care of all that, which _could_ be done, but I'd really rather not if I can avoid it. None of the systems have roles where they should be left on all the time, and I'd like to keep it that way.

This is a peer to peer home LAN, I have no need for a central server (inspite of the fun value) and it needs to work without reconfiguring every new system that trys to plug in, all I'm trying to do is get Linux to play nice with my Windows network, so I can set about finally learning how to use it.

Is their a solution that fits what I'm looking for, or am I going to have to set up a server?

Who is Participating?
Gabriel OrozcoSolution ArchitectCommented:
use freshmeat sute to look for apps that can help you to have a better experience:

there, you can look for smb browsers, where I found these:
smb4k (for KDE)
smb web client
nmb scan (this is for the shell and it scans all names)
jFTP (uses a ftp like protocol for many types of servers, like smb, ftp, nfs, http, etc)

you can find a lot more searching for the word "smb"

and of course, looking for names, not ip's.
akshoslaaAuthor Commented:

gave nmbscan a try, but like with most linux apps I've come accross it expects me in instinctively know what I'm doing, as such I can't do a damn thing with it... and the developers website is no better.

smb4k works, quite well I might add... it manages to retrieve all the hostnames, and display a list of their shares (inspite of half the network being behind SP2 firewalls that prevent me from viewing them normally.) However, it wont mount the shares, giving me an error about "smbmount must be installed suid root for direct user mounts"

Checked the developers homepage, and in their FAQ was the exact problem, with two solutions...

1) chmod -s /usr/bin/smbmount
did that:
ls -l /usr/bin/smbmount
-rwsr-sr-x  1 akshoslaa root  664508 Sep 14 03:05 /usr/bin/smbmount

it made no difference.

2) under superuser/shares check the super user box
I would but it's greyed out...

I'll keep looking though... *puts on his determined face*
akshoslaaAuthor Commented:
Ah... whoops :P
chmod +s smbmnt

my mistake... still doesn't work, but at least I have one less problem now...
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Gabriel OrozcoSolution ArchitectCommented:
if you want to mount shares, do it as root.
You can have DHCP server configured on your linux system rather than on DSL router.
akshoslaaAuthor Commented:
>You can have DHCP server configured on your linux system rather than on DSL router.

Except that would mean having the linux system on _all_ the time... I'd like to avoid that. It's there for me to tinker with and break and fix and generally learn from. Probly not a good idea for the network to rely on it :P

How is it that windows systems can all see each others hostnames without a specific server to tell them? I've been told it's WINS ... My /etc/samba/smb.conf file contains the following:

# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
# the default order is "host lmhosts wins bcast". "host" means use the unix
# system gethostbyname() function call that will use either /etc/hosts OR
# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system configuration
# dependant. This parameter is most often of use to prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that are NOT
# on the local network segment
# - OR - are not deliberately to be known via lmhosts or via WINS.
; name resolve order = wins lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#      Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one      WINS Server on the network. The default is NO.
;   wins proxy = yes

The only change I've made was to revove the semi-colon before wins support = yes (as was suggested by several samba howto's on the net)
Unfortunately it's made absolutely no difference... and as yet I don't know nearly enough about linux to be able to fiddle with the others and see what they do... any suggestions?
Gabriel OrozcoSolution ArchitectCommented:

maybe it is because all the clients must be configured to have the ip of your linux box as wins server...

do that and you will begin to see the difference.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.