Solved

Resolving Windows Hostnames from a Linux Client

Posted on 2004-10-06
9
246 Views
Last Modified: 2010-03-18
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.

Or

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?

Thanks
Scott
0
Comment
Question by:akshoslaa
  • 3
  • 3
9 Comments
 
LVL 19

Accepted Solution

by:
Redimido earned 250 total points
ID: 12239595
use freshmeat sute to look for apps that can help you to have a better experience:
http://www.freshmeat.net

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

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

and of course, looking for names, not ip's.
0
 

Author Comment

by:akshoslaa
ID: 12245279
Hmmm...

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*
0
 

Author Comment

by:akshoslaa
ID: 12245308
Ah... whoops :P
chmod +s smbmnt
NOT
smbmount

my mistake... still doesn't work, but at least I have one less problem now...
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 19

Expert Comment

by:Redimido
ID: 12245863
if you want to mount shares, do it as root.
0
 
LVL 1

Expert Comment

by:uptimecustomercare
ID: 12258647
You can have DHCP server configured on your linux system rather than on DSL router.
0
 

Author Comment

by:akshoslaa
ID: 12258804
>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?
0
 
LVL 19

Expert Comment

by:Redimido
ID: 12260860
hehehe

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.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now