# Can't access Samba Share



## Dead_Lemon (Sep 8, 2012)

Hi all

I've recently run into an issue with my server and Samba
I have no idea what has gone wrong, as all has been working fine, until a few days ago

The past week our internet had become unstable, dropping connection every hour or so, and oddly enough, I was was struggling to connect to my server, but didn't think much of it, I presumed it was possibly something else, and was coincidence 
But every time the internet went down, I would battle to access the server, once the internet was up again, it would work 100%

Now the other day, after logging a fault with our ADSL provider, the wise and wonderful Telkom technician came to sort it out, and made it worse, somehow, and kindly blamed it on our hardware, which is not the issue

Non the less, now that the internet is down, I have no access to my server via samba
I can ping it, and access it via SSH, and all my other services, like SABNZBD or webmin, can still be accessed via my browser

I have no idea why it has dropped, I've tried different Samba configurations, but non have helped
I can see the server on the network, but it can never connect

We have another server on the network, running ubuntu, and it is still running fine
I thought about reinstalling samba, but that is not going to be easy with the lack of an internet connection

Anyone have any ideas, because I'm stumped


----------



## SirDice (Sep 8, 2012)

Can you post your smb.conf please?


----------



## Dead_Lemon (Sep 8, 2012)

```
[Global]
workgroup = WORKGROUP
server string = Smaba Server
security = user
; hosts allow = 192.168.1. 10.0.0. 127.
load printers = no
guest account = nobody
log file = /var/log/samba/log.%m
log level = 2
max log size = 50
hide dot files = yes
; passdb backend =tdbsam
socket options = TCP_NODELAY SO_RCVBUF=131072 SO_SNDBUF=65536
use sendfile = yes
strict locking = no
follow symlinks = no
wide symlinks = yes
unix extentions = no

# Charset settings
; display charset = koi8-r
; unix charset = koi8-r
; dos charset = cp866

# Use extended attributes to store file modes
; store dos attributes = yes
; map hidden = no
; map system = no
; map archive = no

#======================= Share Definitions =========================

[Samba]
path=/tank
browseable = yes
writeable = yes
valid user = nfs
create mask = 0660
directory mask = 0770
```

My internet just came back online, and so did my server. I'm confused
Really want to figure this out, I can't always be online


----------



## mamalos (Sep 12, 2012)

What is your network topology with respect to your machine, your samba-server and your internet router?


----------



## Dead_Lemon (Sep 13, 2012)

We have 2 5 port gigabit switches, which are bridged, due to running out of space

The first switch, we have 2 PC's and the 2 server's 
The 2nd switch we have the adsl router, and a wifi router
The dsl router is set to do all the DHCP assigning


----------



## kr651129 (Sep 13, 2012)

It sounds like an issue with your adsl router to me, is the server that's running samba static or DHCP?


----------



## Dead_Lemon (Sep 14, 2012)

Well the server is set to DHCP, but I tried setting a static IP for the server, still couldn't access samba

Does samba have to be assigned an IP aswell? 

We've changed our dsl router, we will see if that improves the situation


----------



## mamalos (Sep 14, 2012)

Dead_Lemon said:
			
		

> Well the server is set to DHCP, but I tried setting a static IP for the serverr, still couldn't access samba
> 
> Does samba have to be assigned an IP aswell?



What do you mean with server and samba? Aren't they the same machine? Configure your samba server with a static IP -and be certain that the samba server has accepted its IP, other hosts ping it and samba service is up- and see the outcome.


----------



## Dead_Lemon (Sep 14, 2012)

mamalos said:
			
		

> What do you mean with server and samba? Aren't they the same machine? Configure your samba server with a static IP -and be certain that the samba server has accepted its IP, other hosts ping it and samba service is up- and see the outcome.



Sorry, that was my miss understanding, I thought possibly that samba derived its IP separately or something 

But yes it is the same machine 

I think I didn't reboot the server after assigning a static IP, if that could be the reason 

But I could ping the server with a static IP, but samba wasn't accessible


----------



## mamalos (Sep 14, 2012)

Restart your samba server as well, it might help:

`# /usr/local/etc/rc.d/samba restart`


----------

