LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2019, 10:26 AM   #1
ddenial
Member
 
Registered: Dec 2016
Distribution: CentOS, Fedora, Ubuntu
Posts: 309

Rep: Reputation: 52
Fedora 31 - Unable to connect Samba share


Hello All

For learning, just installed Samba share in Fedora 31 and I'm unable to list samba home share as smbclient. I get error 'SMB1 disabled -- no workgroup available'

Code:
$ smbclient -L smb.nix.lan -U atom
Enter SAMBA\atom's password: 

	Sharename       Type      Comment
	---------       ----      -------
	print$          Disk      Printer Drivers
	IPC$            IPC       IPC Service (Samba Server 4.11.4 in smb.nix.lan.)
	atom            Disk      Home Directories
SMB1 disabled -- no workgroup available
My config file:
Code:
$ cat /etc/samba/smb.conf
[global]
	workgroup = SAMBA
	security = user
	server string = Samba Server %v in smb.nix.lan.
	netbios name = SMB-NIX-LAN
	wins support = yes

	interfaces = lo enp3s0
	hosts allow = 192.168.1.0/24 192.168.122.0/24

	acl allow execute always = True
	passdb backend = tdbsam

	printing = cups
	printcap name = cups
	load printers = yes
	cups options = raw

	log file = /var/log/samba/log.%m
	max log size = 50

[homes]
	comment = Home Directories
	valid users = %S, %D%w%S
	browseable = No
	read only = No
	inherit acls = Yes

[printers]
	comment = All Printers
	path = /var/tmp
	printable = Yes
	create mask = 0600
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @printadmin root
	force group = @printadmin
	create mask = 0664
	directory mask = 0775
Some websites say Fedora 31 has disabled SMB1 by default and only allow SMB3. But I don't know what update I should do in my config file to work.

Any assistance is much appreciated.

Thanks
 
Old 12-24-2019, 01:07 PM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,882

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Yes, SMBv1 has been recognised as a major security risk for some time now and now inhibited by default. It should be avoided completely if at all possible, even if that means upgrading any legacy samba servers and hosts in a given LAN environment. However, for some private users with old hardware (eg NAS with samba shares) it may be necessary to force SMBv1 (even if only on a temporary basis). When that is deemed necessary, add the following entry to smb.conf ([global] section)...

Code:
client min protocol = NT1
There are lots of threads and bug reports if you care to search online. For example
https://bugzilla.redhat.com/show_bug.cgi?id=1768117
https://ask.fedoraproject.org/t/fedo...shares/4038/32

Last edited by ferrari; 12-24-2019 at 01:08 PM.
 
1 members found this post helpful.
Old 12-24-2019, 01:43 PM   #3
ddenial
Member
 
Registered: Dec 2016
Distribution: CentOS, Fedora, Ubuntu
Posts: 309

Original Poster
Rep: Reputation: 52
Quote:
Originally Posted by ferrari View Post
Yes, SMBv1 has been recognised as a major security risk for some time now and now inhibited by default. It should be avoided completely if at all possible, even if that means upgrading any legacy samba servers and hosts in a given LAN environment. However, for some private users with old hardware (eg NAS with samba shares) it may be necessary to force SMBv1 (even if only on a temporary basis). When that is deemed necessary, add the following entry to smb.conf ([global] section)...

Code:
client min protocol = NT1
There are lots of threads and bug reports if you care to search online. For example
https://bugzilla.redhat.com/show_bug.cgi?id=1768117
https://ask.fedoraproject.org/t/fedo...shares/4038/32
Unfortunately not working for me.

Code:
# smbclient -L //smb.nix.lan -U atom
Enter SAMBA\atom's password: 

	Sharename       Type      Comment
	---------       ----      -------
	print$          Disk      Printer Drivers
	IPC$            IPC       IPC Service (Samba Server 4.11.4 in smb.nix.lan.)
	atom            Disk      Home Directories
Reconnecting with SMB1 for workgroup listing.
smbXcli_negprot_smb1_done: No compatible protocol selected by server.
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
Unable to connect with SMB1 -- no workgroup available
I read tagged links, but in all examples, some NAS have a problem connecting to the SMB server. In my case, both the Server and Client are the same machine (Fedora 31). Still, I'm getting an error.
 
Old 12-24-2019, 03:02 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,657

Rep: Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652
Code:
Sharename       Type      Comment
---------       ----      -------
atom            Disk      Home Directories
This is your samba home share. Without smb1 it won't pop up under network in your file browser but it can be directly accessed. [homes] is a special share where users with home directories are automatically created as shares with their username.
 
1 members found this post helpful.
Old 12-24-2019, 03:13 PM   #5
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,882

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Does it work if you do this instead?
Code:
smbclient -m SMB2 -d 10 -L //smb.nix.lan -U atom
 
Old 12-24-2019, 03:19 PM   #6
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,882

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
As michaelk mentioned (and due to SMBv1 now completely disabled) you can still access the shares directly eg file browser using
'smb://smb.nix.lan' or specify user with something like 'smb://<user>@smb.nix.lan'

Last edited by ferrari; 12-24-2019 at 03:34 PM.
 
1 members found this post helpful.
Old 12-24-2019, 03:56 PM   #7
ddenial
Member
 
Registered: Dec 2016
Distribution: CentOS, Fedora, Ubuntu
Posts: 309

Original Poster
Rep: Reputation: 52
Quote:
Originally Posted by ferrari View Post
Does it work if you do this instead?
Code:
smbclient -m SMB2 -d 10 -L //smb.nix.lan -U atom
Nope
 
Old 12-24-2019, 04:00 PM   #8
ddenial
Member
 
Registered: Dec 2016
Distribution: CentOS, Fedora, Ubuntu
Posts: 309

Original Poster
Rep: Reputation: 52
So now I tried this, it will connect.

Code:
$ smbclient //smb.nix.lan/atom -U atom
Enter SAMBA\atom's password: 
Try "help" to get a list of possible commands.
smb: \> ls
  .                                   D        0  Tue Dec 24 20:46:56 2019
  ..                                  D        0  Tue Dec 24 18:30:32 2019
  Desktop                             D        0  Tue Dec 24 20:45:07 2019
  .mozilla                           DH        0  Thu Oct 24 04:42:09 2019
  Templates                           D        0  Tue Dec 24 20:45:07 2019
  .bash_profile                       H      141  Fri Dec  6 17:36:53 2019
  Videos                              D        0  Tue Dec 24 20:45:07 2019
  .bash_logout                        H       18  Fri Dec  6 17:36:53 2019
  .bashrc                             H      376  Fri Dec  6 17:36:53 2019
  .local                             DH        0  Tue Dec 24 20:45:07 2019
  .bash_history                       H       73  Tue Dec 24 20:46:56 2019
  Public                              D        0  Tue Dec 24 20:45:07 2019
  .cache                             DH        0  Tue Dec 24 20:45:38 2019
  .config                            DH        0  Tue Dec 24 20:46:59 2019
  Music                               D        0  Tue Dec 24 20:45:07 2019
  Pictures                            D        0  Tue Dec 24 20:45:07 2019
  Documents                           D        0  Tue Dec 24 20:45:07 2019
  Downloads                           D        0  Tue Dec 24 20:45:07 2019
  .esd_auth                           H       16  Tue Dec 24 20:45:07 2019

		205375464 blocks of size 1024. 179438528 blocks available
smb: \> 
I guess I won't be able to list shares in the terminal from now on then. Hmmm.
 
Old 12-24-2019, 05:25 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,657

Rep: Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652Reputation: 3652
Quote:
I guess I won't be able to list shares in the terminal from now on then. Hmmm.
From the file browser not the terminal. Although avahi is supposed to find shares between linux computers which should be installed.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable create a samba share on Fedora 31 using smb 4.11.2 wawacorp Linux - Newbie 1 12-13-2019 11:51 PM
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 02:35 AM
Unable to connect to Samba share (XP client, RHES5 server) soliberus Linux - Software 3 11-21-2008 07:23 AM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 09:23 AM
Simple Samba Setup, Share & Not Share timmywo Linux - Software 4 07-30-2004 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration