Samba Issues

I've got myself into a bit of a fankle* trying to set up folder sharing.
Here's what I did:

Right-click the folder I wanted to share -> Local Network Share

The system prompted me to install the necessary samba components, then I got this

If I look in /etc/samba/smb.conf there is indeed no entry there.

I then found this post which suggests that the samba component in ZorinOS is buggy, this post however is a couple of years old so may be misleading. And its reddit.
https://www.reddit.com/r/linux4noobs/comments/147munk/nautilus_local_network_share_error_255_what_the/

I then found this page and followed the instructions

namely:

sudo apt update && sudo apt install samba nautilus-share

sudo gpasswd sambashare -a $USERNAME

sudo smbpasswd -a $USERNAME

Again this gives an error:
Can't load /etc/samba/smb.conf - run testparm to debug it

Running testparm gives me:
Load smb config files from /etc/samba/smb.conf
Error loading services.

So, I've messed up somewhere and I'm reluctant to try anything else not knowing what I'm doing. Thanks for any help.

**fankle (Scots) ** v. to tangle, mix up; to become tangled;

Just to confirm, once you installed the samba utils, did you restart the system? I know most people don't, but in errors like these, I think a reboot to make sure the links to all the newly installed utils setup correctly may be in order.

1 Like

Yes, rebooted.
And I'm on Zorin OS 17.2 Pro.

Samba seems to be looking in /etc/samba for files, but that location doesn't exist. Something is missing, somewhere.

I've tried uninstalling and reinstalling samba a few times from cli, but I get the same result - Can't load /etc/samba/smb.conf (because the /etc/samba location doesn't exist).

I tried reinstalling:

sudo apt install samba -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
samba is already the newest version (2:4.15.13+dfsg-0ubuntu1.6).
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

whereis

whereis samba
samba: /usr/sbin/samba /usr/lib/x86_64-linux-gnu/samba /usr/share/samba /usr/share/man/man7/samba.7.gz /usr/share/man/man8/samba.8.gz

check installation - seems like an old version?

samba -V
Version 4.15.13-Ubuntu

Check status - failure:

systemctl status smbd
× smbd.service - Samba SMB Daemon
     Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: >
     Active: failed (Result: exit-code) since Fri 2025-01-31 11:24:00 GMT; 29mi>
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 1761 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (>
    Process: 1768 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMB>
   Main PID: 1768 (code=exited, status=1/FAILURE)
        CPU: 39ms

Jan 31 11:24:00 neil-thinkbook systemd[1]: Starting Samba SMB Daemon...
Jan 31 11:24:00 neil-thinkbook smbd[1768]: [2025/01/31 11:24:00,  0] ../../lib/>
Jan 31 11:24:00 neil-thinkbook smbd[1768]:   reopen_one_log: Unable to open new>
Jan 31 11:24:00 neil-thinkbook smbd[1768]: Can't load /etc/samba/smb.conf - run>
Jan 31 11:24:00 neil-thinkbook smbd[1768]: smbd - Failed to load config file!
Jan 31 11:24:00 neil-thinkbook systemd[1]: smbd.service: Main process exited, c>
Jan 31 11:24:00 neil-thinkbook systemd[1]: smbd.service: Failed with result 'ex>
Jan 31 11:24:00 neil-thinkbook systemd[1]: Failed to start Samba SMB Daemon.
lines 1-19/19 (END)

Try with:

sudo apt purge samba

And then install again. If this still doesn't create the file for you, try creating the file yourself. This is the default configuration file that it created for me:

# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin
1 Like

Thanks. It needed an additional step which I found on ubuntu forums. Just doing the purge samba wasn't enough - it reinstalled back to the error condition.

sudo apt-get remove samba --purge
sudo apt-get autoremove
sudo apt-get purge samba-common

Then reinstall.
Now its working. I can right-click a folder and set it to share. Its showing in Nautilus if I enter smb:///folder-name

I haven't yet got it to pick up on my colleague's windows PC, thats next step.

1 Like

Just make sure you also have cifs-utils installed as well. You need to make sure your Zorin 17 is in the same workgroup as the Windows machine.

I'm not seeing a reference to this in the steps you've linked to. I have installed wsdd to enable windows discovery.

I'm now at a stage where the Windows machine still can't see my shared folder but if I type in the address specifically smb:///shared then it picks it up. i enter user and password, and then get 'you do not have permission'. Sorry, can't give the exact wording at the moment as its the weekend, I'm not near that PC.

I've tried with some folders set to share using the GUI in nautilus, and also with setting it up with another folder directly in smb.conf

I'll post exact details tomorrow if I still can't get it.

I'm happy - the samba network is now picked up on my partner's also-Zorin notebook, and following several reboots, the Windows10 also picks it up perfectly.

Strangely its only the shared folder I created in the samba configuration file which is being picked up; the folder I'd shared using nautilus sharing (which used to be visible on the linux machine) is now no longer visible on anything.

Thats fine, so long as I have one working and can replicate it. I can now share these work files between Zorin and Windows.

Thanks all for the pointers along the way. I think the key was that Windows needed a couple of reboots and a good talking to before it worked.

1 Like

This is most likely due to the fact that Nautilus brings its own implementation of the SMB protocol. Once you install or use a specific configuration file, it's probably using that as it's finding it first before whatever internal file Nautilus is using.

Anyway, I'm glad you got it working. As far as I know, the newer versions of Nautilus (specifically starting with Gnome 47) will have much better support on this front. We'll have to wait a bit to see them in Zorin OS, however.

1 Like