Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is kind of crazy, bjshaw, I have already tried everything except the firewall stuff Pcghost has mentioned...
I think we are suffering the same fate... let me re-post my own problem and maybe we can both come up with some more questions!!! HA!
I am running Redhat 8, and the stock Samba version that comes along with it. Windows 98/ME sit on the other side of the 10/100 ethernet LAN. I have a SMC Barricade Router Switch that lets everything through...
I can ping my Redhat PC from Windows, and the otherway around. I have the Redhat PC named as Linux, and the Windows pc named as Windows. I can access Apache locally on Linux, and through the Lan from Windows. I can smbmount my //windows/mydocuments folder from Linux... but...
And here's the issue...
I click on Network Neighborhood in Windows... and my Linux computer does not show up... well, sometimes it does, and I heard this is an issue with Windows... however...
Even when it does, and I double click on it... it will not come up! Even if I type in "\\linux" in the explorer bar, it will not access the shares that I have available on Linux.
I had Mandrake 9 on my old machine and it did the samba shares quite well, but with Redhat 8... it is just a bear, I have been working on this for weeks... I even bought the "Using Samba" by O'Reilly Associates... to no avail.
Well, I hope this forum helps us out...
Does this sound like your problem too?
-Karl
Last edited by karl_herrick; 02-17-2003 at 01:43 PM.
Netbios name resolution and host names are two different creatures. This is a very common place of confusion. Let me attempt to explain:
Host names are resolved within /etc/hosts or DNS. As you resolve http://foo.bar.com or ftp://foo.bad.bar.com this happen either DNS or hosts depending how your network is configured. to resolve a name hosts is checked first and then any DNS setting you have. It's your common Internet, database instance resolve..
Netbios resolves it's names via WINS or LMHosts. Host names in DNS or hosts will not resolve MS Shares. It's apples and oranges.
Samba is of course using Netbios bound to TCP.
NOW - I assume your planning to use this machine as a mail server and a web server. I'm also assuming your adding Samba for local traffic. With this you give this machine a Samba name of ... well just about anything. Your web server hosts name, locale what ever would likely equal you FQDN.
On my machine, I have samba running as a WINS server, AND, I have the lmhosts file listing both my windows pc, and my linux pc. Samba is also configured to search DNS, Wins, lmhosts, and the hosts file for name resolution. The O'Reilly Book covers this... :-) I seem to be missing something however...
For testing purposes, I can ping "Linux" from the winPC, and it reads an ip address of 192.168.2.2 and pings back fine. I can ping the winPC from the linuxPC by pinging "Windows", and it reads an ip address of 192.168.2.3 and pings back fine.
So I am pinging their names, and it works... I'm not sure if this is a realiable test for Samba... but samba is still not working...
Last edited by karl_herrick; 02-17-2003 at 01:52 PM.
Karl - I'm a little short on time at this moment, have to run out the door. I'm not giving this the attention it deserves. I'll get back to you tonight, or tomorrow afternoon.
Remember though netbios uses TCP/IP it does not resolve name issues thru ping, dns or hosts :-)
I tried the "nbtstat -a linux" from a command prompt on my Windows computer, and it couldn't find it... though it did find the "nbtstat -a windows"
In other news of my trying out stuff, I set the windows computer to "user level access" from the network in control panel... it first gave me some password stuff about a windows nt domain, or windows nt server... I chose server... but it hasn't made a difference.
I have the smb.conf file with the following
netbios name = Linux
Why would the windows computer not be finding the linux netbios name?
Last edited by karl_herrick; 02-17-2003 at 09:01 PM.
From your windoze machine do a nbtstat -a a.b.c.d ( what ever the IP address of the linux box is.) It should ( if netbios is working correctly ) return name and workgroup of the Samba server. If nmdb and smbd are up on the linux machine -AND- you have the proper ports for netbios entered in /etc/services you should be on your way.
And your correct nbtstat does not work well in linux. try netstat -a. You will be looking for netbios-ssn, dgm, ns to be present as listening.
If these are all present and you still have issues it's likley something with nb browsing and elections. things get hainy from here. There are many warning about this.
another thing to maybe try, kill WINS, rename lmhosts, bring your linux machine to run level 1 and back up to what ever run level you normaly have. This will reload network and Samba and force a little netbios election for master browser.
With wins and lmhosts disabled nbtstat -a to the linux machine from the windows machine. you should have some responce. If you now resolve the netbios name it may have something to do with wins or lmshost.
if not look at your smb.conf and look at you os level. I've seen some doc out there regarding issues with browser elections and os level.
Normaly you won't need both lmhosts and wins. If all machines are on the same subnet they are needed at all since it's all broadcast based communication.
I tried the nbtstat -a 192.168.2.2, and it said host not found.... I checked my /etc/services file and it had these lines...
netbios-ns 137/tcp # NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp # NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp # NETBIOS session service
netbios-ssn 139/udp
Is this correct? Next I will try the stuff with WINS, and lmhosts... by the way, the lmhosts file should be in all lowercase right? I have seen it both someplaces and am wondering which is right...
Here is a simple smb.conf file. Stop samba, backup the one you have, copy this one and restart Samba. If it works, start adding additional stuff until it stops working. Fix the problem and continue.
Make sure the /home/myshare directory exists before you start samba. Please don't use a Windows text editor to copy this into Linux. Windows adds stuff that Linux doesn't like.
I found a few inconsistencies on your original smb.conf file. We can deal with those later. Let me know if this works.
Note that I have added the loopback address (127.) to your hosts allow command.
I assume that the Windows machine has an i.p. address starting with 192.168.123.
To make it a little more standard, use 192.168.1.
This may not even be an issue but I want to go back to basics. You will need to change the i.p. address of the Linux machine if you choose to go this route.
I noticed a couple things in your config you may want to look at...
workgroup = HOMESHARE - Maybe all lower case here. I saw something simular to this in another thread.
netbios name = Linux - Same thing here. try lower case.
hosts allow = 192.168.2. 127. - Now this may be a problem. make sure you have no spaces in the address and drop the trailing dot.
Now someone correct me if I'm wrong here... If you would like all machines on your local subnet maybe drop the 127 at the end.
Also the machine you are attempting to allow is at x.x.x.3 correct? If my previous statement is incorrect regarding masking attempt changing 127 to 3.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.