LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2020, 06:44 PM   #1
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Rep: Reputation: Disabled
Question Samba not sharing


I am replacing an old Fedora 18 drive because it is failing with a new Fedora 33. I have copied the configurations from the old. I can ping the Fedora 33 file server from Windows but cannot reach it otherwise. Samba is installed and smb.conf file is verified as the same.

From the Fedora drive I can browse the internet and ping the Windows PC so I know the network is working. The only thing missing is the Samba shares. It has been 6 years since I worked with Linux so suspect I have forgotten something basic but can't get a toe hold. Can anyone point me to what I might check ?
 
Old 11-30-2020, 07:09 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,377
Blog Entries: 28

Rep: Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163Reputation: 6163
The first thing that occurs to me is this: Did you configure the smbpasswd file? See man smbpasswd for more,
 
1 members found this post helpful.
Old 11-30-2020, 07:17 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,777

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
Welcome to LinuxQuestions

What version of Windows are you running?

samba and Windows has changed a bit between versions 18 to 33. It's not that 33 is not sharing it is because the network feature in the file browser to find shares uses SMB/CIFS version 1 which has been depreciated and turned off and/or removed. Windows 10 now uses WS-discovery. linux has a WS-Discovery implementation service (wsdd) which is similar to WS-Discovery and lets Windows find linux servers.

Without smb version 1 or wsdd you can connect directly to a linux share from windows by directly entering the server in the URL text box \\samba_server_address\share. Windows will prompt you for a username and password. The same is true for Fedora, in the file browser select other location and enter smb://Windows_computer_address/share.
 
1 members found this post helpful.
Old 12-01-2020, 02:15 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Don't forget to test your installation with smbclient. I would run it on the Fedora server itself (smbclient -L //servername to list all shares) and from a remote Linux system.

If you don't have a remote system, set one up in a VM on Fedora or Windows, or use WSL on Windows.

After listing the shares, try to connect to one. Then mount it:
Code:
smbclient -U USERNAME //servername/sharename
mount -f cifs -o <some option to set username> //servername/sharename /mnt/blabla

Last edited by berndbausch; 12-01-2020 at 02:20 AM.
 
1 members found this post helpful.
Old 12-01-2020, 01:42 PM   #5
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by frankbell View Post
The first thing that occurs to me is this: Did you configure the smbpasswd file? See man smbpasswd for more,
No I didn't. Thank you very much! I now do recall having to create SMB users in addition to users. I have now done that, along with the SMBPASSWD. I am still unable to reach the Fedora PC with a file browser but the SMB user and password were needed. Thank you. I am also unable to browse to the Windows PC from Fedora, even though I have a share for Everyone. That means there is something else going on. I can ping each from the other but that is all. I will let you know what I find.
 
Old 12-01-2020, 01:49 PM   #6
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by michaelk View Post
Welcome to LinuxQuestions

What version of Windows are you running?
10.


samba and Windows has changed a bit between versions 18 to 33. It's not that 33 is not sharing it is because the network feature in the file browser to find shares uses SMB/CIFS version 1 which has been depreciated and turned off and/or removed. Windows 10 now uses WS-discovery. linux has a WS-Discovery implementation service (wsdd) which is similar to WS-Discovery and lets Windows find linux servers.

Without smb version 1 or wsdd you can connect directly to a linux share from windows by directly entering the server in the URL text box \\samba_server_address\share. Windows will prompt you for a username and password. The same is true for Fedora, in the file browser select other location and enter smb://Windows_computer_address/share.
From Windows 10, with a user the same as one defined in Fedora and with an SMBUSER, I attempt to browse to \\192.168.1.71. The Windows 10 is 192.168.1.2, the same subnet, going throug a CAT6, not wireless. Both are plugged into the same Netgear router as the only things plugged into it.

I will make sure I have wsdd.

Thank you!
 
Old 12-01-2020, 01:59 PM   #7
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
Unhappy

[QUOTE=berndbausch;6190519]Don't forget to test your installation with smbclient. I would run it on the Fedora server itself (smbclient -L //servername to list all shares) and from a remote Linux system.

On the Fedora PC I opened console with su - and entered: smbclient -L //192.168.1.71 and got
[root@localhost ~]# smbclient -L //192.168.1.71
do_connect: Connection to 192.168.1.71 failed (Error NT_STATUS_CONNECTION_REFUSED)
[root@localhost ~]#

Samba is installed, smb users created with passwd and shares defined in a smb.conf file copied from the working Fedora 18. I really didn't expect this failure. I'll double check everything.
 
Old 12-01-2020, 02:00 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,777

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
Quote:
From Windows 10, with a user the same as one defined in Fedora and with an SMBUSER, I attempt to browse to \\192.168.1.71. The Windows 10 is 192.168.1.2, the same subnet, going throug a CAT6, not wireless. Both are plugged into the same Netgear router as the only things plugged into it.
This should work regardless of wsdd. Can you successfully connect to the Fedora computer?

You do not have to be root. From the same computer

smbclient -L localhost

Use the user's samba password.

Is samba running?
systemctl status smb

Last edited by michaelk; 12-01-2020 at 02:04 PM.
 
1 members found this post helpful.
Old 12-01-2020, 02:17 PM   #9
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
Unhappy

Is samba running?
systemctl status smb[/QUOTE]

No it isn't! Thank you for the test.
smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor p>
Active: inactive (dead)
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)

It seems the Samba service id disabled : |
 
Old 12-01-2020, 02:25 PM   #10
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
I restarted the Samba service and retested and found joy : )

[root@localhost ~]# systemctl restart smb.service
[root@localhost ~]# smbclient -L //192.168.1.71
Enter WORKGROUP\root's password:
Anonymous login successful

Sharename Type Comment
--------- ---- -------
Test Disk Test
 
Old 12-01-2020, 02:27 PM   #11
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
But again my Windows PC can ping 192.168.1.71 but cannot reach it. I plug into a different router or switch.
 
Old 12-01-2020, 02:35 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,777

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
Forgot to mention if you allow samba traffic through the firewall?
 
1 members found this post helpful.
Old 12-01-2020, 07:16 PM   #13
odeck
LQ Newbie
 
Registered: Nov 2020
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by michaelk View Post
Forgot to mention if you allow samba traffic through the firewall?
Bingo!!!

I ran systemctl stop firewalld then went to the Windows PC and instantly saw all the shares : )

Thank you very much !!!


SOLVED
 
  


Reply



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
Samba/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 01:33 AM
sharing internet but samba doesnt work, turn filewall off samba works but net isnt Jungle_King Linux - Networking 2 05-08-2009 07:00 AM
samba does not create "samba/netlogon" and "samba/profiles" mianmajidali Linux - Server 0 04-27-2008 05:07 AM
Linux Samba to Linux Samba sharing - possible? Micro420 Linux - Networking 2 09-13-2006 12:35 AM
File sharing and internet sharing mullet Linux - Networking 1 10-14-2003 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:38 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