-
Samba Problems
I have set up a small server running Redhat 7.2 which runs 24/7 it has been running for about a month and yesterday Samba stopped working. I have tried restarting the service, stopping the service rebooting and then re-enabling samba (worked in Mandrake) but to no avail.
It there an easy solution that I am missing?
BTW if the help could be command line based that would be really helpful.
Thanks in advance.
Yuri.
-
Does anyone have any ideas? It has been a week since I have been able to access the machine from a windows box, and the people that I built it for are starting to get a bit annoyed.
Please help.
Yuri.
-
I'm far from being a Samba expert, but checking the Samba log files would be a fantastic place to start. They'll be under /var somewhere, probably /var/samba with a modern linux distro. If not then do a "find / -name smb.conf" to find the samba config file and see what it's logging to.
-
Tuttle thankyou for your advise I will have a look at the smb.conf. To check if there are any problems with smb.conf I run testparm correct?
-
Yep. But don't overlook the other part of my post - check the log files. You'll probably have more joy there than looking for syntax errors in smb.conf.
-
Check the log files, also open /etc/rc.config and look for the line START_SMB="yes" it should say yes if it dosent change it.
To control samba from command line:
rcsmb status
rcsmb stop
rcsmb start
rcsmb restart
rcsmb reload
rcsmb force-reload
Also look at your smb.conf in the global section for the line kernel oplocks set it to false if it is'nt already, make sure the keepalive variable is set to 30 and put the ip addresses of the machines in the hosts allow setting.
This is how the global section on our server's smb.conf looks:
Code:
workgroup = BBT
keep alive = 30
os level = 2
kernel oplocks = false
security = SHARE
read only = no
hosts allow = ip.ip.ip.ip, ip.ip.ip.ip etc........
RB :)
-
Thank you all for your help, I will try those commands on the server rami3. And tuttle thanks for telling me where to find the smb.conf. As I have used Mandrake Linux until recently and the smb.conf was in /etc/.
Thanks for your help
Yuri.
-
Ok I have found out the problem with the smb.conf file it was a section under shared definitions (too many characters in description?) Anyway there is nothing wrong with the smb.conf file now but I still cannot see the linux machine from any windows boxes. Samba is enabled and I can mount windows shares from the linux machine, but not the other way around.
What is going wrong?
Also rami3 those commands do not work, do I have to be in any specific directory first?
Thanks for all your help.
Yuri.
-
Are you running the commands as root, they are all the standard rc commands for checking samba status etc, try running from /usr/bin, or /etc but i dont think that should matter.
Unless you have not got them installed i would be very surprised if they were not there. Glad you got the problem kind of sorted anyway. :)
Have you added the Windows boxes to your hosts allow variable in the smb.conf, i had a similar problem where too many machines were able to see my linux shared dirs, i added the ip addresses of the allowed machines to the hosts allow and restarted samba and nfs server, only the allowed machined can see them now.
Try remapping the linux shared drives via windows, also check the read write permissions on the dirs of the linux shares. Is the nfs server running, try starting that also.
Hope this helps.
RB :)
-
Rami3 thanks for the suggestion about the hosts, I will have a look and post back later today.
Also I should of said this in the first post but there is a NT workstation on the network could this have any effect?
Yuri.
EDIT: forgot to mention the fact that no windows machine can see the linux machine.
One more thing stupid question, but does Redhat 7.2 have tripwire installed when a complete install is done?
-
Ok I have checked everything again and I still cannot make the linux machine appear on the network. I even shortened the name of the computer incase that had anything to do with it. But still nothing, what could be the problem with it. Does it have anything to do with the fact that there is a NT workstation on the same network?
Yuri.
-
I dont think the NT box will make a difference, but have you tried taking it off the network and restarting samba.
Search for the linux box using the find tool in M$ windows, if its broadcasting on the network and samba configuration is correct I cant think why it would not be found.
Can you post your smb.conf so i can get a look at it.
RB :)
-
I have finally fixed the problem thankyou rami3 and tuttle for you help. I was going through the configuration in Linuxconf (in text mode) and I then a configuration box came up telling me that samba was not started. So I selected the option the apply the changes and I happened to see it execute the command "/etc/rc5.d/S91smb start" so when that didn't work I made samba force reload (I cannot remember the exact command) and now the linux machine can be seen on the windows network and I have full conectivity again.
Thanyou all for you help in solving this problem.
Yuri. :p