Skip to content

Samba for Cockpit

by SEYSOFT · Version 1.0.0

Share folders with Windows, Mac and Linux computers from your browser inside Cockpit. Manage Samba shares and users without smb.conf.

Bare metal Server management MIT
Samba for Cockpit

Overview

A module for Cockpit that shares folders with Windows, Mac and Linux computers using Samba, and manages Samba users, without editing smb.conf by hand. It is built to look like a factory Cockpit page (PatternFly 6) and follows Cockpit's light and dark setting.

It is self-contained: nothing else needs to be installed, it makes no network connections of its own, and it needs no account, repository or other module. It does not install Samba for you. If Samba is missing, the page tells you (sudo dnf install samba). It is static files only (HTML, CSS and JavaScript), with no compiled code and no scripts run at install time.

What it does

  • Overview: status and version, Start, Stop, Restart and Reload for the smb and nmb services, start at boot, a firewall check with a one-click "Allow Samba", a configuration test (testparm), and the workgroup and server description.
  • Shares: list, create, edit and remove shares (folder, read-only or read and write, allowed users, guest access, permissions). It can create the shared folder for you and set its owner. Removing a share only edits smb.conf; your files stay.
  • Users: add, disable, enable and remove Samba users and change their passwords. Passwords are sent to Samba privately and never appear in command lines. It can create a system account with no login shell when you add a Samba user, and removes it again if adding fails.
  • Activity: who is connected right now and which shares are in use (read-only; needs administrative access).
  • Edit smb.conf: edit the file directly, with automatic backups.

Safe by design

Every change to smb.conf is checked with testparm before it takes effect and is rolled back automatically if Samba rejects it. Start, restart and reload refuse to run while the configuration has a problem.

Good to know

  • Needs Cockpit 337 or newer (Rocky Linux or RHEL 9.7 and later, current Fedora). Older Cockpit versions refuse to load it.
  • Samba must already be installed on the server. The module only suggests it, never pulls it in.
  • Reading works for any user. Anything that changes the system asks for administrative access.
  • On Rocky and RHEL, SELinux also decides what Samba may read and write. If clients connect but cannot write, apply the chcon hint shown in the share dialog.
  • Shares are managed in smb.conf only (not the Samba registry). There is no Active Directory or domain join support.
  • There is no Samba log viewer yet and no way to disconnect a user. Backups are never pruned and there is no "restore a backup" screen.
  • Bundles PatternFly 6 styles (MIT) and Red Hat fonts (SIL OFL 1.1); their licences are included.
  • Cockpit, Samba, Red Hat, Rocky Linux and Fedora are trademarks of their respective owners. This is an independent module and is not affiliated with or endorsed by any of them.
  • You run it on your own systems, at your own risk. Test changes on a non-production server first.

Installation

Download the release file, cockpit-samba-1.0.0-manual.tar.gz, then choose one:

System-wide (all Cockpit users, needs root)

sudo tar -C /usr/share/cockpit -xzf cockpit-samba-1.0.0-manual.tar.gz

One user only (no root needed to install)

mkdir -p ~/.local/share/cockpit
tar -C ~/.local/share/cockpit -xzf cockpit-samba-1.0.0-manual.tar.gz

If Samba isn't installed yet:

sudo dnf install samba

Then log out of Cockpit and back in. Cockpit reads its module list at login, and "Samba" appears in the left menu. If it doesn't, run this as the same user to see whether Cockpit found it:

cockpit-bridge --packages | grep -i samba

Updating: there is no automatic update. Unpack the newer archive over the old one and log in again.

Removing

sudo rm -rf /usr/share/cockpit/samba
sudo rm -rf /var/lib/cockpit-samba

For a single-user install, remove ~/.local/share/cockpit/samba instead. The second line is optional and deletes the saved smb.conf backups. Log out and back in afterwards. Your shares, Samba users and smb.conf stay exactly as they are.

Files it uses on your server

Path Purpose
/usr/share/cockpit/samba/ (or ~/.local/share/cockpit/samba/) The module itself
/etc/samba/smb.conf The configuration it reads and edits
/var/lib/cockpit-samba/backups/ Timestamped backups before every change (root only; created on first change)

Requirements

  • Cockpit 337 or newer (Rocky Linux or RHEL 9.7 and later, current Fedora)
  • Samba installed on the server (sudo dnf install samba)
  • An administrative account for anything that changes the system
  • No internet access needed

Versions

  • 1.0.0 Latest · Nov 23, 2026 · 228.2 KB

    SHA-256 8aad4e90d67d75443bf69ffac6cd2990e90f4dfdc6588d6d82348da44ab3c997

    Release notes

    Initial release. Cockpit module for Samba: service control with config test, shares, users and passwords, live activity, smb.conf editor with backups and automatic rollback, and a one-click firewall allow.

To check a download, compare the SHA-256 above with sha256sum <file> on Linux and macOS, or Get-FileHash <file> in PowerShell. If they differ, download it again.

Software is provided as it is, and any open-source components keep their own licences. Need help with it? Contact support.

More software

View all →

Nginx for Cockpit

SEYSOFT

Manage the nginx web server from your browser inside Cockpit: static sites, reverse proxies, config editing and logs, with rollback.

Bare metal Server management
v1.0.0 Included

Apache for Cockpit

SEYSOFT

Manage the Apache web server from your browser inside Cockpit: sites, reverse proxies, HTTPS, config editing with rollback, logs and SELinux.

Bare metal Server management
v1.0.1 Included

RF Workbench

SEYSOFT

Browser control panel for a HackRF One: live spectrum and waterfall, tune and listen, a channel scanner and an RF activity monitor, in Docker.

Docker Communications
v0.9.0 Included