[Solved] Samba-shares on Raspberry Pi not accessible

Ask questions about Arch Linux ARM. Please search before making a new topic.

[Solved] Samba-shares on Raspberry Pi not accessible

Postby McFox » Fri Mar 21, 2014 1:26 pm

Hello!

First off, I'd like to say that even though I'm new here, I'm definitely not new to Linux, so no "Have you tried restarting the samba-daemon"- kind of answers please :)

Anyway, yesterday I noticed that my Windows 8-based HTPC wouldn't connect to my samba-shares on my Raspberry Pi. "Map network drive" works nicely, I see the "drive" in explorer, but when I try to open it, it says the drive might be corrupted or in a format that Windows can't read. So I proceeded to configure everything I could imagine in Windows, to no avail. Then I booted my iMac, and noticed it refused to connect as well :/ It says I either don't have permission to access the machine, or there are no shares.

I find this really strange, considering that this setup was working a while ago (not sure when it stopped working, I haven't used samba that much lately). I googled around a lot, and discovered that this might have to do with Samba being upraded from Samba3 -> Samba4 (?). I find this likely as my Apache-configuration also broke the other day when I updated my system, going from Apache 2.2 to 2.4. Some topics mentioned "nmbd", which I have never used before. I enabled and started it, and changed "name resolve order" to "bcast host" according to some thread I found, and then my Mac was able to discover the machine, but shares are still not available.

Here's my smb.conf (comments stripped), I'd be very gratefull if someone could tell me what to change in order to get this working again :) :

$this->bbcode_second_pass_code('', '[global]
workgroup = PAULINET
server string = Raspberry Pi Samba Server
netbios name = RASPI
name resolve order = bcast host
hosts allow = 192.168. 127.
log file = /var/log/samba/%m.log
max log size = 50
security = user
map to guest = Bad User
dns proxy = no

[Kirjani]
comment = WD-MyBook
path = /mnt/Kirjani
valid users = pauli
public = yes
browseable = yes
writable = yes
guest ok = yes
readonly = no

[Meriportti]
comment = Seagate-Expansion
path = /mnt/Meriportti
valid users = pauli
public = yes
browseable = yes
writable = yes
guest ok = yes
readonly = no

[Home]
comment = Home-Folder
path = /home/pauli
valid users = pauli
public = yes
browseable = yes
writable = yes
guest ok = yes
readonly = no')

Most of the lines under each share are unnecessary, I know. They're just stuff I've ended up putting there throughout the years, I've used the same configs since 2008 :)

I also did "pdbedit -a -u pauli" in case I'd used smbpasswd before, but that didn't help either :/

EDIT: I noticed that when stripping comments, I'd accidentaly stripped the "security" and "map to guest lines" too. Sorry, added now.

Hmm... I'm noticing these errors whenever I start smbd (from /var/log/samba/smbd.log) :
$this->bbcode_second_pass_code('', '
open_socket_in(): socket() call failed: Address family not supported by protocol
[2014/03/21 16:17:09.503932, 0] ../source3/smbd/server.c:684(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Address family not supported by protocol
')

Could this have something to do with my problem?
Last edited by McFox on Mon Mar 24, 2014 5:57 pm, edited 1 time in total.
McFox
 
Posts: 20
Joined: Fri Mar 21, 2014 12:57 pm

Re: Samba-shares on Raspberry Pi not accessible

Postby jeajea » Fri Mar 21, 2014 9:29 pm

My host allow is commented out (accepts any IP address)
After map to guest I have a line
$this->bbcode_second_pass_code('', '
guest account = root')
I have these lines

$this->bbcode_second_pass_code('', 'socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072
write cache size = 2097152
use sendfile = yes
getwd cache = yes')

A writeable share for everyone

$this->bbcode_second_pass_code('', '[b1s]
path = /media/b1
public = yes
writeable = yes
guest ok = yes')
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Samba-shares on Raspberry Pi not accessible

Postby McFox » Sat Mar 22, 2014 10:15 am

Hmm.... After putting "guest account = root" in the config, I can open the machine on Windows and see the shares, but they still won't open. No error message anymore though, it just keeps loading forever.

I was going to install a git-version of samba 3.6, but building failed after two hours :/ So I guess the only alternative is to get samba4 to work...

Interrestingly, my Android-tablet is able to connect and browse files :o But Windows & Mac can't...
McFox
 
Posts: 20
Joined: Fri Mar 21, 2014 12:57 pm

Re: Samba-shares on Raspberry Pi not accessible

Postby jeajea » Sat Mar 22, 2014 4:42 pm

In windows advanced sharing setting try

Enable file sharing for devices that use 40 of 56 bit encryption

If the tablet can access your shares then it is fairly certain that you need to change one or more Windows setting.
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Samba-shares on Raspberry Pi not accessible

Postby McFox » Sun Mar 23, 2014 1:19 pm

That's what I thought too, but then again, it doesn't work on my Mac either, so ... ?

I'm pretty sure I tried enabling 40 or 56 bit encryption, but I'll check that anyway. But if that works, wtf do I do with my Mac :D
I solved those errors in the log, by the way. Turns out they had something to do with IPV6, and setting "bind interfaces only = yes" in smb.conf disabled it, so no more errors in the log.

I installed netatalk, so I'm now able to access my drives on my Mac through that, but this still leaves Windows. I really don't know what to do, I've tried everything I could come up with already :/ Is there anything I could replace samba with? I know some Windows versions support NFS, but mine doesn't... Maybe there's some way to use afp on Windows? I'd prefer not to have many processes for the same thing though, and Samba seems to be the most compatible (if only I could get it to work again...).
McFox
 
Posts: 20
Joined: Fri Mar 21, 2014 12:57 pm

Re: Samba-shares on Raspberry Pi not accessible

Postby McFox » Mon Mar 24, 2014 5:56 pm

Problem solved! :) I browsed my logs and discovered that my root-partition was too full to host some samba-related cache files. So I moved my /var/log/-folder to an external drive and mounted it in /var/log/, freeing up about 250mb and now Windows is able to access the shares normally :) 250mb is a lot on my Pi, by the way, since Arch is installed on a 2gb SD-card.
McFox
 
Posts: 20
Joined: Fri Mar 21, 2014 12:57 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 12 guests