Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
It looks to me like your tcp/ip settings and address are good. If you can ping then you should be fine. You have a samba configuration problem. Check to make sure that you have a smb daemons running on both linux boxes, you have the passwords setup correctly and that you have shares and allowed hosts configured in the /etc/smbd.conf file. Also, if you are running iptables or ipchains on either of the linux boxes, that you allow port 137 and 139 for local connections. These are the netbios ports.
If any of these boxes are on the internet I suggest that you make sure the netbios ports are DROP (ed) at the firewall.
Hi crabboy, I really very new to linux and I have difficulty in understanding some of the terms.
1) How do I check that my smb daemons running on both linux boxes? I did run my samba server (SMB , NMB). and it has executed successfully.
2) How to check passwords setup correctly?
3) I have add the other hosts at the netconf, is this the same as the allowed hosts configured in the /etc/smbd.conf file?
4) How do I check whether am I running iptables or ipchains. How do allow port 137 and 139.
5) Can you kindly explain "If any of these boxes are on the internet I suggest that you make sure the netbios ports are DROP (ed) at the firewall. ". I have successfully connected adelineh (samba server) to the internet, anything related?
Originally posted by adeline_AhMei 1) How do I check that my smb daemons running on both linux boxes? I did run my samba server (SMB , NMB). and it has executed successfully.
ps -ef | grep mb
you should see smbd and nmbd somewhere in the output. Also have a look at /etc/log.smb and /etc/log.nmb to see if there are any errors. If there are errors check the dates there were produced - some time ago I spent ages trying to sort out a Samba error that was reported ages ago and wasn't there anymore!
Originally posted by adeline_AhMei 2) How to check passwords setup correctly?
You need to either enable encrypted password support on Samba or disable the use of encrypted passwords on Windows. In the documentation that comes with Samba there are a number of .reg files that you can run on Windows to disable the password encryption. Clearly its better to get the encrypted passwords working on the linux side but I've never played with this, having only used Samba at home and I don't have any plans to crack my own server
You will also want to make sure that whatever user you log in to Windows as exists on the Linux box, and to simplify things give them the same password.
Originally posted by adeline_AhMei 3) I have add the other hosts at the netconf, is this the same as the allowed hosts configured in the /etc/smbd.conf file?
Pass! Never used netconf... If you have been editing /etc/hosts via netconf then no - its different. You can have a subnet in your allowed hosts, which is what I'd suggest you do. For my home LAN (which is 192.168.1.X) I use
hosts allow = 192.168.1. 127.
so that any machines on my LAN have access.
Originally posted by adeline_AhMei 4) How do I check whether am I running iptables or ipchains. How do allow port 137 and 139.
If you are using the 2.2 kernels then try running
and see if there is any mention of DENYing or DROPing packets anywhere.
Originally posted by adeline_AhMei 5) Can you kindly explain "If any of these boxes are on the internet I suggest that you make sure the netbios ports are DROP (ed) at the firewall. ". I have successfully connected adelineh (samba server) to the internet, anything related?
If you connect your Samba server to the web it will look like a Windows machine and you'll probably find that you'll get people trying to exploit the Samba server. By setting up a filewall to drop all packets on you NetBIOS ports you make yourself a little safer. I'd concentrate on getting the server working first though! Then have a look at some of the postings in the Security forum... have a search for posts by 'Raz'.
1) For the hosts allow = x.x.x.x, is this supposed to be included in the hosts.allow file? Does it refers to the subnet mask?
You can either include a set of machines on the allow = line or you can include a group of machines as Jamie did in his example. If you have just a few machines, under 5, you should probably just list the ip address of the machines that you want connected.
allow = 10.0.0.199 10.0.0.191 10.0.0.192
This allows the three machines mentioned above. The allow statement below will permit access to the three above as well as the other 254 IP address that fall between 1 and 254:
allow = 10.0.0.
2) So under the netconf, I should not include other hosts except the localhost rite?
I don't use netconf. I'm assuming, by your question, that you are talking about the /etc/hosts file. I'm not sure if it's required by samba, but if you or a process needs to lookup a machine by IP or name you will need to list all of your machines there.
2) When i received the error "Connection refused", what should i do?
That probably means that nothing is listening on the port or that a process may be listening, but may not like the connecting process. Try this:
telnet localhost 139
And see if you get a Conection Refused error. My machine will connect and just sit there. Type "Ctl- ] " to get out. If you still get a Connection Refused error then recheck the 'md' daemons with the ps command as Jamie pointed out to you.
Check the smb log files that get created in /var/log. I think they are named samba.???, something like that. They may give you a clue at what the problem is. Also don't forget about /var/log/messages and /var/log/syslog files.
3) For networking b/w linux to linux station, should i use smbclient or telnet?
The smbclient would be used for file sharing and telnet sessions for teminal sessions.
Not to confuse you more, but for linux to linux file system shares NFS (Network File System) would probably be a bit easier and faster than running samba.
I don't know if you have looked at the samba how-to document. It is a great reference, and if you follow it page-by-page you will have samba up and running in no time.