You are not logged in.

#26 2020-05-07 07:21:50

quiqueck
Member
Registered: 2013-04-15
Posts: 60

Re: Cannot access samba shares since update to samba 4.11.3-3

Just add the values discussed above to the section [global]:

client min protocol = CORE
server min protocol = CORE

The client min protocol can be omitted, imho.

I have those values also added in /etc/samba/smb.conf. Don't know if this is needed.

Offline

#27 2020-05-07 07:45:43

kinleyd
Member
From: Bhutan
Registered: 2012-09-21
Posts: 140

Re: Cannot access samba shares since update to samba 4.11.3-3

You were right, just adding 'server min protocol = CORE' was sufficient (and not required in /etc/samba/smb.conf)

Between rolling back, and juggling /etc/samba/smb.conf and smb.conf in tmp, I'd clean forgotten retrying the above.

Many thanks, as this at least works as a stop gap.

Last edited by kinleyd (2020-05-07 07:46:37)

Offline

#28 2020-05-07 08:06:05

quiqueck
Member
Registered: 2013-04-15
Posts: 60

Re: Cannot access samba shares since update to samba 4.11.3-3

Glad you got it work again :-)

Here is my script. Adjust QEMUCMD to your needs:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-


import threading
import subprocess
import os
import configparser
import time


QEMUCMD = "qemu-system-x86_64 " \
          "/FULL/PATH/TO/vm.img " \
          "-enable-kvm " \
          "-machine type=pc-i440fx-2.3 " \
          "-vga cirrus " \
          "-net nic,model=rtl8139 " \
          "-net nic " \
          "-net user,smb=/FULL/PATH/TO/SHARED/FOLDER"

SMBCNF = "smb.conf"


class RunQemu(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        subprocess.run(QEMUCMD, shell=True)


background = RunQemu()
background.start()

# Just wait some seconds to be sure the temporary folder is created
time.sleep(2)

print('Searching for qemu specific smb.conf in /tmp ...')
path = None
for root, dirs, files in os.walk("/tmp"):
    if SMBCNF in files:
        path = os.path.join(root, SMBCNF)
        print("Found smb.conf: {}".format(path))

if path:
    config = configparser.ConfigParser()
    config.read(path)
    try:
        config['global'].update({
            'server min protocol': 'CORE',
                })
        with open(path, 'w') as f:
            config.write(f)
        print("Succesfully adjusted smb.conf.")
    except KeyError:
        print("FAILURE: Can't adjust smb.conf!")
else:
    print("FAILURE: Can't find smb.conf in /temp!")

background.join()    # Wait for the background task to finish
print('Main program waited until background was done.')

Save in a file and run it like

python SCRIPTNAME

At least python version 3.5 is needed, just to mention it.

Offline

#29 2020-05-07 08:10:39

kinleyd
Member
From: Bhutan
Registered: 2012-09-21
Posts: 140

Re: Cannot access samba shares since update to samba 4.11.3-3

Thank you, it is much appreciated. In time I will switch to a tap/tun solution as the samba and internal smb settings seem to have too many grey areas!

Offline

#30 2020-05-12 19:42:48

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 471

Re: Cannot access samba shares since update to samba 4.11.3-3

In my case adding "client min protocol = default" to /etc/samba/smb.conf solved the problem with accessibility of HDD connected to my router, but now all the files are displayed and treated as...folders.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI GT75 Titan 8RG

Offline

#31 2020-05-13 08:03:43

kinleyd
Member
From: Bhutan
Registered: 2012-09-21
Posts: 140

Re: Cannot access samba shares since update to samba 4.11.3-3

Zibi1981 wrote:

In my case adding "client min protocol = default" to /etc/samba/smb.conf solved the problem with accessibility of HDD connected to my router, but now all the files are displayed and treated as...folders.

Weird, eh?

BTW I love your signature. Right now I feel like part of my floor has been removed by someone.

Last edited by kinleyd (2020-05-13 08:51:07)

Offline

Board footer

Powered by FluxBB