How to Set Up Samba Shares in Ubuntu Server with Webmin

You can set up Samba shares in Ubuntu Server without hand-editing /etc/samba/smb.conf by using Webmin's Samba Windows File Sharing module. The basic workflow is to install Samba, open Webmin over HTTPS, create a share, set its access rules, add a Samba user, and then connect from Windows.

1. Install Samba and Webmin

Start by installing Samba from Ubuntu's repositories:

sudo apt update
sudo apt install samba

Ubuntu's official Samba file server documentation uses the same samba package. If Webmin is not already installed, Webmin recommends adding its official repository with the setup script and then installing the package:

curl -o webmin-setup-repo.sh https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repo.sh
sudo sh webmin-setup-repo.sh
sudo apt-get install webmin --install-recommends

See the official Webmin installation page for the current repository method.

Ubuntu Server terminal installing the Samba package with apt
Install Samba before opening Webmin's Samba management module.

2. Sign in to Webmin over HTTPS

From a computer that can reach the server, open:

https://SERVER-IP:10000

Webmin's current installation guide specifies HTTPS on port 10000. Sign in with the administrative account configured for your Webmin installation. You do not need to enable remote root login or set a root password just for this tutorial. If a firewall protects the server, allow port 10000 only from trusted management networks where practical.

Webmin sign-in page opened at an Ubuntu Server IP address on HTTPS port 10000
Open Webmin securely at the server address on port 10000.

3. Open the Samba Windows File Sharing module

After login, open Servers > Samba Windows File Sharing. Webmin's Samba module documentation says the module lists existing shares and provides controls for creating new ones.

Webmin dashboard on an Ubuntu Server with the Servers section in the sidebar
Use the Servers category in Webmin to reach Samba Windows File Sharing.

If Webmin reports that it cannot find smbd, confirm that the samba package installed successfully before changing module paths.

Webmin Samba Windows File Sharing page listing public backup and media shares
The Samba module shows existing shares and the button for creating a new file share.

4. Create the directory you want to share

Create the folder first and give the intended Linux user or group appropriate filesystem permissions. This example uses an existing Linux user named alex:

sudo mkdir -p /srv/samba/documents
sudo chown alex:alex /srv/samba/documents

Linux permissions still apply even when Webmin says a share is writable. For a multi-user share, use a dedicated group and group permissions instead of making one user the owner.

5. Create the share in Webmin

In Samba Windows File Sharing, click Create a new file share. Enter a simple share name such as documents, set Directory to share to /srv/samba/documents, leave Browseable? enabled if you want the share listed to clients, add a short comment, and click Create.

Webmin Create a new file share form for a documents share in /srv/samba/documents
Set the share name, directory, browseability, and description before creating the share.

6. Configure security and write access

Click the new share, then open Security and Access Control. For a typical password-protected LAN share, set Writable? to Yes only if users should modify files, set Guest access? to None, and put allowed usernames in Valid users.

Webmin documents share settings with Security and Access Control selected
Open Security and Access Control to review who can use the share.

Webmin also supports guest access, but avoid combining unrestricted guest access with write permission unless you intentionally want anyone who can reach the share to create or change files. The Ubuntu Samba access-control guide explains that authenticated Samba users and normal Linux filesystem permissions work together.

Webmin Security and Access Control page with writable enabled guest access disabled and one valid user
For a private share, keep Guest access set to None and list the users who are allowed in.

7. Add the user to Samba

A Linux account is not automatically a Samba login. For an existing Linux user such as alex, add a Samba password with:

sudo smbpasswd -a alex

Enter the password that Windows clients will use for this share. The Ubuntu documentation notes that the Samba credential can be different from the Linux account password.

8. Apply the configuration and connect from Windows

Webmin notes that Samba normally notices configuration-file changes automatically, so a restart is usually unnecessary. If the module shows Restart Samba Servers and you need to force a reload, you can use it after saving the share.

On Windows, open File Explorer and enter the UNC path:

\\SERVER-IP\documents

When prompted, sign in with the Samba username and password. If the share does not appear under Network, try the direct UNC path first; network browsing is not required for the share itself to work.

Windows File Explorer opened to a documents Samba share by server IP address
Connect directly to the Samba share with the server IP address and share name.

Quick troubleshooting

  • Permission denied: check both Webmin's share rules and Linux ownership or mode bits on the shared directory.
  • Login rejected: confirm the Linux user exists and has been added with smbpasswd -a.
  • Share is unreachable: verify that Samba is running and that your firewall allows SMB traffic from the client network.
  • Webmin is unreachable: confirm you are using https://, port 10000, and a trusted management path to the server.

Leave a Comment

How to Record Speaker Output on Linux with Audacity

How to Record Speaker Output on Linux with Audacity

Capture Linux desktop audio in Audacity by routing its recording stream to your output device’s monitor source. Follow PulseAudio and PipeWire steps, export tips, and fixes for silent tracks.

How to Use Dropbox on Linux: Install and Sync Your Files

How to Use Dropbox on Linux: Install and Sync Your Files

Install Dropbox on Linux from the official package, sign in, sync a local folder, manage selective sync, and check status from the command line.

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

Install Inkscape from your Linux distribution’s repositories, the Ubuntu stable PPA, Snap, or Flathub, with current commands and notes for choosing a package source.

How to Find and Remove Duplicate Files on Linux With FSlint

How to Find and Remove Duplicate Files on Linux With FSlint

Use FSlint to scan selected Linux folders, review duplicate groups, and safely delete redundant files or learn when hard-link merging is appropriate.

How to Install SABnzbd on Linux and Configure It

How to Install SABnzbd on Linux and Configure It

Install SABnzbd on Ubuntu or Debian, or run it in Docker on another Linux host. Then open the web interface and configure your provider and download folders.

How to Install the Paper GTK Theme on Linux

How to Install the Paper GTK Theme on Linux

Install the Paper GTK theme from supported Linux repositories, enable it for GTK apps in GNOME Tweaks, and see what the legacy theme can and cannot change.

How to Install and Set Up Plex on OpenMediaVault with Compose

How to Install and Set Up Plex on OpenMediaVault with Compose

The old OpenMediaVault Plex plugin is archived. Set up Plex on OMV 8 with OMV-Extras, the Compose plugin, persistent storage, and Plex’s official container.

How to Clean and Speed Up Ubuntu Safely

How to Clean and Speed Up Ubuntu Safely

Clean and speed up Ubuntu with safe APT cleanup, storage checks, and startup controls that help free space and troubleshoot a sluggish desktop.

How to Install the Hiri Email Client on Linux

How to Install the Hiri Email Client on Linux

Install Hiri on Linux with its Snap package or official tarball, add a desktop launcher, and check supported accounts plus a warning about Hiri’s old Snap release.

How to Get System Specifications for a Linux PC

How to Get System Specifications for a Linux PC

Use Fastfetch and built-in Linux commands to check your distro, kernel, CPU, memory, graphics, storage, and connected devices, then save a clear report.