Unreachable Samba Share

Hello Endeavour Community

I’m a recent Transfer from Manjaro and I need help

I’m using KDE and trying to get Samba working
right now my smb.conf is

[global]
workgroup = WORKGROUP
server string = Samba Server
server role = standalone server
log file = /var/cache/samba/log.%m
max log size = 50

[public]
path = /srv/samba
public = yes
only guest = yes
writable = yes
printable = no

When my Wife tries to access my system she is asked for a username & password, and nothing seems to work.

I would really appreciate any and all help

thanks in advance

welcome

1 Like

When your wife tries to access your system, what OS is the server and what OS is the client?
Is the server Linux and the client Windows. Are both server and client Linux or both Windows.

If the server is Linux, you will have to create a SAMBA user to access the server.
In the Linux server machine as root:
# smbpasswd -a pshare
New SMB password: EnterAPassword
Retype new SMB password: Re-enter the same passwordpassword
The password can be whatever you want and does not need to be an existing password.

If any of the devices have firewalls, set up the server’s firewall for samba.
Adjust IP the address as necessary.
# ufw allow from 192.168.0.0/24 to any port 445
# ufw allow from 192.168.0.0/24 to any port 137
# ufw allow from 192.168.0.0/24 to any port 138
# ufw allow from 192.168.0.0/24 to any port 139

# ufw status

Status:
active
To Action From


9XXX ALLOW 192.168.0.0/24
445 ALLOW 192.168.0.0/24
137 ALLOW 192.168.0.0/24
138 ALLOW 192.168.0.0/24
139 ALLOW 192.168.0.0/24

Now we need systemd to start up the services at boot up.
# systemctl enable smb.service
# systemctl enable nmb.service
# systemctl start smb.service
# systemctl start nmb.service

Welcome to the community, thanks for joining us :beers:

I’m not a networking pro myself, but maybe this previous post would be of use:

Hi sorry for the lack of details
MY machine is the host, it’s Linux, Endeavour Os
My wife’s machine is windows
I’m not currently running a firewall

Followed your instructions using the username james

Now the other computer can connect, BUT is not seeing folders that I tried to share using KDE

My hope is to eventually allow simple quick and easy sharing of folders through the KDE interface, using that “sharing” tab in the properties window.

Is your provider on smb1 protocol ? In France here, we have one principal provider who use only smb1 protocol which is removed from Samba since few months now for licensing story… Check already this in case !

Did you add in your [global] ?

client min protocol = NT1
server min protocol = NT1

I am not understanding the “using that “Sharing” tab in the properties window”. Perhaps a screen shot will help get it through my think skull.

Here is a link to a tutorial that I wrote. Click on download, to go to a browser’s pdf viewer then save the pdf file if desired. Maybe something in there might help you.

I have noticed that since Arch Linux went to samba v4 that all of a sudden I’m seeing recommendations I have never seen before. The top 2 are add
ntlm auth = true
in the Global section of smb.conf

The other involves Windows 10.
We will be setting up a Windows 10 computer as a client to share files on our Linux LAN server.
Make sure that your Windows 10 computer has “Network Discovery” turned on.
Settings - Network & Internet - Network & Sharing Center - Advanced Sharing Settings

Since this Windows computer will be a Client, an entry must be made in the “hosts” file.
Click on the Windows button in the panel then Windows Accessories,
Right click on Notepad, → more → Run as Administrator.

In Notepad, Click on file → open.
This PC → Local Disk (C:) → Windows -->System32 → drivers → etc
In the lower right, change “Text Documents (*.txt)” to “All Files”
open hosts, At the end of the hosts file, add the following
192.168.0.155 enosServer
adjust the IP address and host name as necessary.
File → Save

There has been a /etc/hosts file in Linux since forever, But it is just recently that I have seen recommendations to place an entry in the Windows 10 hosts file. Never knew it even existed til recently.

my smb.conf
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors. 
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = TRESAMIGOS
   ntlm auth = true

# server string is the equivalent of the NT Description field
   server string = Samba Server

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
   hosts allow = 127. 192.168.0.

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Backend to store user information in. New installations should 
# use either tdbsam or ldapsam. smbpasswd is available for backwards 
# compatibility. tdbsam requires no further configuration.

   passdb backend = tdbsam

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   valid users = %S, %D%W%S
   browseable = No
   writable = yes
   inherit acls = Yes

# NOTE: If you have a BSD-style print system there is no need to 
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /usr/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
[ENOSshare]
   comment = Samba Share
   path = /server
   valid users = pshare
   public = no
   writable = yes
   printable = no
   create mask = 0765

Pudge

1 Like

thanks for the PDF
I’ll look at it and give it a try

for reference
Screenshot_20200729_185812
here’s the window/tab i was speaking of

1 Like

OK, now I am on the same page as you. I have never tried connecting to a samba server that way. I learn something new everyday. :man_student:

Let me know if you get that working through the “Properties for Media” tab.

Pudge

ok, updates
as said before i’m coming from Manjaro where I had file sharing working properly
I copied a smb.conf from the tutorial there.

smb.conf now looks like:


[global]
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/%m.log
max log size = 1000
client max protocol = default
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = NewUNIXpassword %n\n ReTypenewUNIXpassword* %n\n passwd:allauthenticationtokensupdatedsuccessfully*
pam password change = yes
map to guest = bad user
usershare allow guests = no
name resolve order = lmhosts bcast host wins
security = user
encrypt passwords = yes
guest account = nobody
usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare owner only = yes
group = sambashare



[Media]
path = /mnt/WD_External/Media/
public = yes
only guest = yes
writable = yes
printable = no

I can manually add shared by editing the smb.conf file, and people can access them without problem, the sharing tab in KDE still seems to not function, not sure what the disconnect is there, but at least it’s working, I’ll just have to add my shares manually to the smb.conf file

Did you look at my smb.conf file I attached to post # 7?

Click on the horizontal arrow head.

Pudge

Yes I did Pudge, and I tried working with it, I had to change the workgroup name, and it gave me mixed results. The file I posted just above is working nicely, but I think the problem with sharing from within KDE is a KDE issue not a Samba issue