You are not logged in.

#1 2017-10-07 14:26:46

piedro
Member
Registered: 2013-04-11
Posts: 218

how to completely reset the cifs/samba configuration to default?

Hello!

Since I had problems finding my own shared folders on my local machine browsing the network with nautilus or dolphin (also from a virtualbox windows 10 test environment) I read through many wiki pages and tried to fix the problem... 

My problem with the wiki is it tell me all the things I could configure but never tells me which use cases I need them for. So probably I've configured way too much cause everything sounds realted...

Here is my problem:
Using nautilus or dolphin to browse the "windows network" gives me just no results at all.
Using a win10 installation in virtualbox gives me "you may not have permission to browse this server" but at least it finds 
the server as "arch"...

Now systemctl shows me that smbd, nmbd and winbindd are all running ok.
The shares have been created not in smb.conf but simply by using nautilus' "share folder" feature...

Running
"$ smbclient -L arch" shows me my shares and my workgroup (as set in smb.conf) without trouble, 
running
"$ smbclient -B" shows "DNS-SD browsing is not supported on this platform" !

So I looked at the wiki again and I found all kinds of configuration suggestions for avahi...

Could someone tell me what I need for a minimal setup to make filesharing at a desktop level work?
I do not need any persistent smb/cifs mounts nor any user/password mappings... just a simple default setup for quickly sharing files between machines and virtualboxes (sure I can setup shared folders in virtualbox but I just want a simple adhoc solution).   

I am willing to throw out the whole samba/cifs/nmbd/winbind (whatever else is involved) and recreate a minimal setup for the above mentioned purpose if that is the recommended way to go. In this case I'd be happy to hear how to really clean out all the related configurations completely and start with sane defaults.

Sad thing this worked flawlessly before, maybe something broke with some updates.
This is on arch fully updated with the supposed stable gnome 3.26 as of today...


thx for reading, sry for the long post,
I'd really appreciate some help here...

cheers, p.

Last edited by piedro (2017-10-07 14:28:23)

Offline

#2 2017-10-08 13:35:38

lpr1
Member
Registered: 2017-10-08
Posts: 68

Re: how to completely reset the cifs/samba configuration to default?

I can help you only for browsing your machine from Windows machine, I assume you did add group "sambashare" and did add your user to the group. Also if you are using ufw you need to allow specific address of your Windows machine, or whole range of LAN machines (I ususally do "ufw allow from 192.168.0.0/24" since some machines use dynamic IP, I assume same is the case for VirtualBox machine).

After you did all that, you can add to your smb.conf:

   map to guest = Bad User
   security = user
   guest account = nobody

and you can make permament shares in your smb.conf with for example:

[mysharename]
        comment = Guest access share
        path = /path/to/your/share
        browseable = yes
        read only = yes
        guest ok = yes

This way you can avoid password requirement and it is easy but not as secure I guess. Nautilus "share feature" never really worked for me, and this will only work if you are sharing files from EXT4 (or other GNU/Linux) partitions. Last time I used samba (about one month ago) I had same problem as you (computer list was empty when browsing from nautilus, while Windows computers could see and access my shares without problem), so when you say it did work "before" how much before?

Offline

#3 2017-10-08 13:59:08

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: how to completely reset the cifs/samba configuration to default?

Thx for your detailed efforts to help here!

But in my case (yes, sambashare exists, user also, password etc.) this is exactly what I don't want. I know how to edit the smb.conf for static shares. That's been the same principles for the last ten years...

The more modern way (and appropriate for non technically versed users) is to have a dynamic system of using user shares (yes I added the necessary lines to smb.conf) to just add a samba share ad hoc with your file manager. Windows explorer does it, apples finder does it, nautilus, dolphin, thunar have the option to right click a folder and choose "share" without administrative permissions. After your done sharing you simply "unshare" again...

This as described above has been working before but doesn't anymore.

Since I do not know whether I misconfigured something or whether it's an arch specific regression - I need some help to either troubleshoot and solve it or to roll back to a minimal working setup using sane defaults allowing the mentioned intended behaviour of user initialized shares.

Thx anyway,
cheers, p.

Last edited by piedro (2017-10-08 13:59:33)

Offline

#4 2017-10-08 14:15:42

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: how to completely reset the cifs/samba configuration to default?

p.s: regarding your hint about the filesystem - I couldn't find anything about that and also never heard about it... would you care to give me link or nodge in he right direction here? I am having different machines - atm neither ext4 ones nor xfs or an experimental btrfs does work for the sharing...

And to answer your closing question: It worked something like 4 month before - I used an ad hoc samba share on my arch system as windows backup target for some system renovations on client computers...

Last edited by piedro (2017-10-08 14:18:45)

Offline

#5 2017-10-08 14:33:46

lpr1
Member
Registered: 2017-10-08
Posts: 68

Re: how to completely reset the cifs/samba configuration to default?

My hint for filesystem was related to ntfs, in past when I used ntfs and tried to share something from ntfs partition over samba it required special permissions (umask=000,gid=username,uid=username). wll I've tried,

I had same problem as you do now about month ago where I couldn't browse computers on the network from nautilus (empty list), I have to set up samba anyway, so will do tomorow and I can post result if it works or not. So it is possible that if you need to revert packages you would need to go well over 2 months.., anyway will do it tomorow and post how it goes.

Offline

#6 2017-10-08 14:38:11

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: how to completely reset the cifs/samba configuration to default?

thx, I'd really appreciate that... :-)

Offline

#7 2017-10-09 03:03:54

lpr1
Member
Registered: 2017-10-08
Posts: 68

Re: how to completely reset the cifs/samba configuration to default?

Ok, so I've tried to configure samba on my own machine, the problem we are facing seems to be connected with cifs.

I did configured samba and everything, and I can access my shares from my spare machine (Lubuntu 16.04) from PCManFM. I can list all network devices from my machine using nmap -sP 192.168.0.0/24, but I can't access any shares from nautilus same as you, it doesn't even offer workgroup, just empty list.

I realize this isn't helpful, but you are not alone smile, so msot likely your samba is configured properly, I'm searching for a solution now.

EDIT: I'm banging my head about it for a while anc I give up..., terminal browsing works..., nautilus or other file managers no, and even adding "name resolve order = bcast host lmhosts wins" to smb.conf doesn't help.

Last edited by lpr1 (2017-10-11 07:38:42)

Offline

#8 2017-10-19 13:05:54

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: how to completely reset the cifs/samba configuration to default?

Thx a lot for your research!

I am a bit late answering but, you know, some times there is a holiday... :-)

The behaviour you describe is exactly the same for me.
Also I tried changing the name resolve order before and after switching configurations - no success...

This is a complete showstopper for anyone who wants to set up a box in an office or work related environment.
I honestly do not understand why this is not a high priority bug.

Have you tried other distros using gnome? Is this an ARCH only problem?


Again, thx for writing the information you got,
cheers, p

Offline

#9 2017-10-19 13:55:02

lpr1
Member
Registered: 2017-10-08
Posts: 68

Re: how to completely reset the cifs/samba configuration to default?

@piedro

On my 2nd machine running Lubuntu 16.04 I can browse network shares from PCManFM without any problem. From what I understand it is gvfs problem/bug in recent versions. Using smbtree command shows all network shares available, so if that is the same for you samba is configured properly and we should seek solution elswhere (gvfs?).

I did not try using newer versions of Ubuntu (17.xx), you might try from VirtualMaxhine, in fact, I will try it now as soon as I finish writing this comment and download Ubuntu iso., will report back in editing comment.

It doesn't work from Ubuntu 17.10 from VirtualBox, but even more strange it doesn't work from Ubuntu 16.04 in VB.

Last edited by lpr1 (2017-10-19 15:13:34)

Offline

#10 2017-10-20 02:24:00

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: how to completely reset the cifs/samba configuration to default?

That's sad :-(

thx and cheers,
p.

Offline

#11 2017-10-20 11:49:30

caskale13c
Member
From: Colleyville, TX, US
Registered: 2008-12-29
Posts: 33

Re: how to completely reset the cifs/samba configuration to default?

I had this problem and fixed it by adding:

  client max protocol = NT1

to the [global] section of smb.conf. 

I have no idea what it does.  I found it in another post and unfortunately cannot give credit where due.

Offline

#12 2017-10-20 12:16:03

lpr1
Member
Registered: 2017-10-08
Posts: 68

Re: how to completely reset the cifs/samba configuration to default?

caskale13c wrote:

I had this problem and fixed it by adding:

  client max protocol = NT1

to the [global] section of smb.conf. 

I have no idea what it does.  I found it in another post and unfortunately cannot give credit where due.

Can you post your smb.conf in code here? I've tried to change max protocols before to smb3/2/1 and it didn't do anything, I'm not sure what NT1 means (I assume samba version 1?) but it doesn't change anything in my configuration. In fact it seems that it breaks samba, now it doesn't work even with smbtree in terminal.

Offline

#13 2017-11-12 07:00:35

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: how to completely reset the cifs/samba configuration to default?

Finally I could fix this issue for my needs:


I used this Antergos tutorial:
https://antergos.com/wiki/de/desktops/g … ive-guide/

but changed three things:

- I do NOT enable the systemctl service samba (only smbd, nmbd)

- I do NOT in smb.conf use the line entry "include = /etc/samba/smb.conf.%m"

- obviously in smb.conf I have to set my own WORKGROUP name and
restrict access to my local network's IP range and the loopback network device (127.)


With these measures I can browse the windows network in nautilus just fine (after a reboot, strangely enough!) but I still cannot enter my own shared folders which I created with nautilus - they immediately time out...

The hint in the ARCH wiki concerning the same problem for the dolphin file manager and referring to this post in the Ubuntu forums "https://ubuntuforums.org/showthread.php?t=1605499" suggests changing or adding this in smb.conf:

name resolve order = lmhosts bcast host

(default is: "name resolve order = lmhosts wins hosts bcast")

Also I completely abandoned the winbindd - samba has it's own name resolution built in which I haven't been aware of.

Now everything works as expected. Though I really think ARCH or GNOME should offer a default configuration which works out of the box. For any user not being able to simply browse the windows network and quickly share files this is a complete show stopper... well, at least now, after weeks of searching, posting and fiddling, it works for me.


Hope this might be helpful,
cheers, p.

Last edited by piedro (2017-11-12 07:02:42)

Offline

#14 2017-11-12 07:53:49

lpr1
Member
Registered: 2017-10-08
Posts: 68

Re: how to completely reset the cifs/samba configuration to default?

Great, I no longer have home network so I can't test it, thanks for sharing solution, please mark it as solved.

Offline

#15 2017-11-12 09:07:21

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: how to completely reset the cifs/samba configuration to default?

Well, give me some more time...

There are still more problems, for example my virtual boxes still time out  after seeing, choosing and connecting to my network folders... sigh

Offline

#16 2017-11-12 09:27:25

lpr1
Member
Registered: 2017-10-08
Posts: 68

Re: how to completely reset the cifs/samba configuration to default?

Oh, I thought it was solved, my bad.

Offline

Board footer

Powered by FluxBB