[SOLVED] Samba and Cockpit doesn't work well with Raspberry Pi 4 Model B

Hi,

my OS is Debian 11. I downloaded and installed the image for my Raspberry Pi 4 Model B on a sd-card. After starting and configuring I installed “Samba”. I activated “Group Share” for two USB-Sticks. Clicking on “FREEDOMBOX” in the filemanager there is the answer that mounting isn’t possible, access denied. After reactivating “service-detection” there appears “freedombox SFTP server” in the filemanager. Login is possible. The two USB-sticks appear. After restarting my desktop computer the “FREEDOMBOX” and “freedombox SFTP server” di











sappear. After reactivating “service-detection” there appear “FREEDOMBOX” and “freedombox SFTP server” in the filemanager again. “FREEDOMBOX” login is still not possible. Only “freedombox SFTP server” works well. It’s the same with “Open Share” or “Home Share”.

After Cockpit-Login there is the message: “Connection failed. There was an unexpected error while connecting to the machine. Messages related to the failure might be found in the journal: journalctl -u cockpit”

Login via ssh:

$ journalctl -u cockpit
Hint: You are currently not seeing messages from other users and the system.
Users in groups ‘adm’, ‘systemd-journal’ can see all messages.
Pass -q to turn off this notice.
– Journal begins at Fri 2022-03-11 08:12:59 UTC, ends at Fri 2022-03-11 08:21:>
– No entries –

Any ideas?

Hi @vrillo,
Welocme to our community!

Can you try to access your Samba share using the IP Address of your FreedomBox?

After Cockpit-Login there is the message: “Connection failed.

On the FreedomBox web interface you should go to System >> Cockpit and scroll down to Access. Cockpit will only be available using the domain(s) listed there. Can you upload a screenshot of that too?

Thanks for entry.

No, I can’t access my Samba share using the IP Address of my FreedomBox:
smb://192.168.178.20

No, Cockpit is not available using the domain listed there:
https://freedombox.local

By the way: Radicale works fine.

I passed a diagnosis. Everything seems to work except:

App: Netzwerke
DNSSEC wird auf IPv4 verwendet gescheitert
DNSSEC wird auf IPv6 verwendet gescheitert

what means:
App: Network
DNSSEC is used on IPv4 failed
DNSSEC is used on IPv6 failed

It looks like your computer doesn’t recognise the freedombox.local domain. As a workaround to get access to Cockpit you can:

  1. Configure a fully qualifiable domain name or from the Tor app a hidden service for the box and then access Cockpit using those addresses.
  2. Another option is to edit your computer’s /etc/hosts file adding the following line:
    192.168.178.20 freedombox.local

For Samba, can you try different file managers or maybe try to reach it from a mobile device?

I use option 2 which works fine. I’ve got access to Cockpit now. Thanks!
For Samba I tried Nautilus, Nemo, Thunar, Dolphin and a mobile device. No chance!

1 Like

I will play around with Samba on my Pi to see what’s going on.

Ok… You should know that I’ve also OpenMediaVault installed on another sd-card.There is full access via Samba.

I don’t know if this is important: samba-ad-dc.service is masked.
2022-03-11_18-37-13

Okay, so the reason why you can’t connect to Samba is bacause FreedomBox has a firewall policy that devides the networks interfaces into being either Internal or External. For Samba, you must have an Internal network interface connected, however, on this Raspberry Image, the default Internal interface is set to be wlan0. You should:

  1. Delete wlan0
  2. Activate Wired connection 1
  3. Refresh the page to see the changes

Samba should be accesible now.
Looks like there’s a bug however: restarting the server will set the firewall rule back to defaults… Should be fixed soon.

1 Like

The reason for this behavior could be how Firewall Zones are configured.

In a typical FreedomBox image/hardware there are no Wi-Fi drivers due to non-free nature of firmware. There is only network interface available. The first setup script in this case will configure the only available Ethernet network interface as “internal” zone. On this zone, Samba is allowed.

In case of Raspberry Pi 3/4 64bit images that we are building, Wi-Fi firmware is shipped by default. This means one Ethernet interface and one Wi-Fi interface are available. The first setup script in this case will configure the Ethernet as “external” and Wi-Fi as “internal” zone. So, Samba would likely be available when connected via Wi-Fi and not on LAN.

This can be confirmed by editing the network connection and changing the firewall zone. We can rethink the approach for first setup too if we have better ideas.

wlan0 deleted.

Wired connection 1 is enabled. FreedomBox WAN is automatically disabled. I can’t enable both. Now I can’t reach neither FREEDOMBOX nor freedombox SFTP server. I’m not allowed to post a further screenshot by a further reply. So I’ve to wait for 3 hours.

I have increased the trust level (exists to deal with spam from new accounts) on your account. You should be able to post images without restrictions.

Since both FreedomBox WAN and Wired connection 1 are DHCP connection, rebooting the machine will activate at least one of them and you should be able to access FreedomBox again.

Whatever connection is active, make sure it is has “internal” as firewall zone so that you can access Samba on it.

After rebooting Freedombox “Wired connection 1” disappeared. Only "FreedomBox WAN "is visible and enabled. Is this a problem? I changed firewall to intern. I can reach “FREEDOMBOX” (but not “freedombox SFTP server” anymore) by Samba now.


2022-03-12_09-21-17
2022-03-12_09-22-18

1 Like

On my home computers and my mobil device everything works fine now: Calendars and contacts. I’ve access to my usb-sticks via Samba. I use my Pi for an internal network, not reachable from outside. My aim was to have both things on a Raspberry Pi: NAS and synchronisation of calendars and contacts. With OpenMediaVault I only had NAS. For one moment I was near to buy the FreedomBox home server of Olimex. But in that case my Pi 4 would have been needless. So now it seems to be perfect. Thanks to nbenedek and sunil!

2 Likes