Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Samba woes!

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ljones0
Posts: 84
Joined: 2013-03-30 22:51

Samba woes!

#1 Post by ljones0 »

Hello all!

Having a *lot* of problems trying to get samba running here. First of all let me explain exactly what I'm trying to do -- I'm trying to get both a samba server and client running (but not on the same machine!). The only reason that I am using samba is that in my household there are people that use (cough, spit!) windows though I don't -- all the systems under my control all run debian.

I can get the samba server running on the raspberry pi working (as is the wifi stick I'm using with it, since it is an older raspberry pi 2). Here's the config file ( /etc/samba/smb.conf):

Code: Select all

[global]
 workgroup = WORKGROUP
 netbios name = TEST
 map to guest = Bad User
 log file = /var/log/samba/%m
 log level = 1

[guest]
 path = /home/pi/files/
 read only = no
 guest ok = yes
That's just a simple example from the samba website . For now I'm just trying to keep things as easy as possible by using anonymous access (once it works, I figure I can actually 'put in' users).

Snag is that configuring my debian boxes as a samba client seems to be a total nightmare -- not yet got it to work reliably. First stop was here which seems to suggest that only the package cifs-utils ("Should work out of the box if you install cifs-utils"). Only snag - it dosen't quite work!

I can reach the raspberry pi by using the ip address , ie. smb://192.168.0.101 (that is in dolphin as I'm using KDE, Debian stetch). But if I actually try to type the server name all I ever got was an error (again using dolphin) "Could not connect to host for smb://" (then after that the host name). Using dolphin and clicking on network gives several options "Bluetooth","MTP Devices","Network","Samba Shares"; clicking on Samba shares results in the error "Unable to find any workgroups in your local network. This might be caused by an enabled firewall" (I don't have a firewall running!).

After a couple of restarts I eventually got past the "Unable to find any workgroups" error but the raspberry pi dosen't seem to show up in the workgroups. (Again I can access it via its IP address).

One thing I really couldn't find all that much about btw was how to configure a samba client and not a samba server or server+client. Is it me or is the debian page on samba client setu a bit out of date (the date at the bottom of the page says last modified 2015-09-27 17:30:11).

Also I note that on that page it says "Mounting samba shares for easy access by programs does not work out of the box because NetBIOS name resolution isn't set up correctly". Is that still the case now?

I can find lots of "solutions" outside this site by searching online but I can find almost nothing about just configuring a client only (along with KDE); a lot of the posts/info out there seem to be pretty old -- I can find posts from 2010 or 2008 or even before that (which would be long obsolete).

Anyone got any ideas at all? Many thanks!

ljones

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: Samba woes!

#2 Post by 4D696B65 »

Does the R pi have avahi-daemon installed?

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: Samba woes!

#3 Post by ljones0 »

>Does the R pi have avahi-daemon installed?

It does indeed! Should I remove/disable it and try again? (The other computer too has it installed as well).

Update: Ok, this is really weird. It now seems to be working - but for how long I don't know. Don't think this is solved at all really btw. It's strage -- last night I had the problem above; come back the next morning (and I've not changed anything on the pc; all I've done on the raspberry pi this morning is to plug it in (as well as the PC; I normally turn it all off as I did last night) and check weather or not avahi-daemon is installed and it works......weird.....I've changed literally nothing.....

Snag is I can't see it staying working.



Another update: I think I might have found what is causing the problem (but no solution). It appears on the pc the workgroup/smb running on the raspberry pi cannot be detected any more once a windows pc is being used on the network.

What would cause that at all?


Third update: This might be fixed. Not only were windows machines on the network messing around (I really have no idea how; I don't use windows) I also found a second problem. For some bizarre reason an SMB share was also enabled on another PC acting as a backup system running openmediavault. And it had its SMB enabled (I do not remember enabling it!). Not sure why it should make any difference though as the rasberry pi and desktop PC are on an entirely different range of IP addresses to the openmediavault. Disabling SMB in openmediavault might have fixed all of this.

Prehaps it was all just one big entangled network SMB mess?

ljones

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Samba woes!

#4 Post by andre@home »

Pi uses Debian I guess....
Only for file sharing?

Instead of SAMBA you can also use Webdav.
Windows can cope with Webdav or you can use Netdrive. The old version is free for home users and works perfect.
http://bernaerts.dyndns.org/linux/75-de ... bdav-share
This is for Debian 6, but I got it work for Debian 8 Jessie.
Got it even working on a Debian 8 Live USB stick.
You can configure Webdav for the safer protocol https via port 443.
There a lot on the internet for tips.

Post Reply