hivetech
Posts: 3
Joined: Sun Jun 04, 2017 12:59 am
Location: CH

SMB shares failed to connect

Sun Jun 04, 2017 1:14 am

Hi folks

I disabled SMB1 on all my storage systems (mostly Synology) after WannaCry, it didn't affect me directly but you never know.
After I did that, Solus was not willing to connect anymore, because it tries to connect via SMB1 but doesn't try a higher version.
It gives the error "Failed to retrieve share list from server: Connection timed out."
Solution is to enforce at least SMB2 via "/etc/samba/smb.conf" with the following two lines inside the "global" section:
client min protocol = SMB2
client max protocol = SMB3


After adding the lines via your desired editor, restart samba;

Code: Select all

sudo systemctl restart smb.service
and verify via

Code: Select all

samba-tool testparm
if the lines are added and no errors show up.

Finally connections will work again!

@solus devs: probably consider to ship this as default because SMB1 is really dead now, just sayin'

sunnyflunk
Development Team
Posts: 2926
Joined: Sun Mar 13, 2016 11:35 pm

Re: SMB shares failed to connect

Tue Jun 06, 2017 8:09 am

hivetech wrote:
Sun Jun 04, 2017 1:14 am
Hi folks

I disabled SMB1 on all my storage systems (mostly Synology) after WannaCry, it didn't affect me directly but you never know.
After I did that, Solus was not willing to connect anymore, because it tries to connect via SMB1 but doesn't try a higher version.
It gives the error "Failed to retrieve share list from server: Connection timed out."
Solution is to enforce at least SMB2 via "/etc/samba/smb.conf" with the following two lines inside the "global" section:
client min protocol = SMB2
client max protocol = SMB3


After adding the lines via your desired editor, restart samba;

Code: Select all

sudo systemctl restart smb.service
and verify via

Code: Select all

samba-tool testparm
if the lines are added and no errors show up.

Finally connections will work again!

@solus devs: probably consider to ship this as default because SMB1 is really dead now, just sayin'
This would be a good one to put on https://dev.solus-project.com/ to get it integrated into the package

hivetech
Posts: 3
Joined: Sun Jun 04, 2017 12:59 am
Location: CH

Re: SMB shares failed to connect

Fri Nov 17, 2017 11:57 pm

Sorry for the long off-time
Is this already done yet, or should I jump into the gap?
If yes, then I definitely need a starter guide for how to change that :P

EDIT: I just tested again on a newly installed system without the changes and it seems that they are no longer needed!

ermo
Posts: 3
Joined: Mon Nov 20, 2017 2:49 pm

Re: SMB shares failed to connect

Mon Nov 20, 2017 3:07 pm

hivetech wrote:
Fri Nov 17, 2017 11:57 pm
Sorry for the long off-time
Is this already done yet, or should I jump into the gap?
If yes, then I definitely need a starter guide for how to change that :P

EDIT: I just tested again on a newly installed system without the changes and it seems that they are no longer needed!
I'm looking into the samba stuff and your report has been noted. No need to do anything else.

I'll include a link to the relevant commit(s) once we get this sorted once and for all. :ugeek:

Pyrrhic
Posts: 12
Joined: Mon Jan 09, 2017 1:45 pm

Re: SMB shares failed to connect

Thu Dec 14, 2017 9:31 pm

! Thank you! My god, finally I can samba again! That really had been driving me crazy for the best part of a year now. GENIUS!

ermo
Posts: 3
Joined: Mon Nov 20, 2017 2:49 pm

Re: SMB shares failed to connect

Mon Jan 22, 2018 11:51 pm

The samba work I've done, which includes a default but user-overrideable configuration, landed in stable a little over a week ago.

Please let us know if you experience any issues. Thanks. :)

charltonstanley
Posts: 1
Joined: Tue Jun 12, 2018 2:23 am

Re: SMB shares failed to connect

Tue Jun 12, 2018 2:31 am

i experienced the same issue on two brand new freshly downloaded setups. it appears that by default smb.service is disabled, however, adding the smb2/3 version specifications to smb.conf did fix this problem, even without enabling the smb.service. Note, smb.conf did not yet exist, i had to create it manually.

how collect the exact version\build of solus that i experienced this on, so that i can add it to my post? (please forgive my ignorance, i am a brand new solus budgie user)

thanks for the solution!

User avatar
kyrios
Posts: 1926
Joined: Thu Sep 22, 2016 4:20 pm

Re: SMB shares failed to connect

Tue Jun 12, 2018 6:03 pm

charltonstanley wrote:
Tue Jun 12, 2018 2:31 am
i experienced the same issue on two brand new freshly downloaded setups. it appears that by default smb.service is disabled, however, adding the smb2/3 version specifications to smb.conf did fix this problem, even without enabling the smb.service. Note, smb.conf did not yet exist, i had to create it manually.

how collect the exact version\build of solus that i experienced this on, so that i can add it to my post? (please forgive my ignorance, i am a brand new solus budgie user)

thanks for the solution!
A big work was done to make samba installation easier, so please make sure your system is up-to-date and have a look at the help center.

You can check the running kernel version with uname -r and you ça check packages détails with eopkg info e.g. eopkg info samba

Return to “Tutorials”