A GUI-based Samba configuration tool for Linux, built with Qt 6 (QML) / C++17.
An alternative to the discontinued system-config-samba.
SambaConfig allows you to visually edit smb.conf, manage Samba users,
validate configuration with testparm, control smbd/nmbd services via systemd,
and manage firewalld ports - all from a single GUI application.
- Edit smb.conf - Read, edit, and save Samba configuration files with a graphical editor
- Validate configuration - Run
testparmto check smb.conf syntax directly from the GUI - Manage Samba users - Create and delete Samba users via
smbpasswd/pdbedit - systemd integration - Start, stop, and check the status of
smbd/nmbdservices - firewalld integration - Open and close ports (SMB, NetBIOS, LDAP, Kerberos, DNS, etc.)
- Internationalization - English and Japanese
- Dark / Light theme - Material Dark theme by default, switchable to Light theme
- Adjustable font size - Three levels (small, normal, large)
SambaConfigApp (GUI, QML/C++)
|
|--[D-Bus]--> SambaConfigHelper (runs as root)
| Uses PolKit for authentication
| Reads/writes smb.conf
| Executes testparm, smbpasswd, pdbedit
| Queries remote Samba servers (libsmbclient)
|
|--[link]---> libSambaConfigUtility.so (shared library)
| File permission checks
| Process execution utilities
| User/group information queries
|
|--[D-Bus]--> org.freedesktop.systemd1 (systemd)
|--[D-Bus]--> org.fedoraproject.FirewallD1 (firewalld)
SambaConfigApp runs as a normal user. Operations that require root privileges (reading/writing smb.conf, managing users, etc.) are delegated to SambaConfigHelper via D-Bus, with PolKit authentication.
SambaConfigProject/
├── SambaConfigApp/ # Main GUI application
│ ├── Source/ # C++ backend
│ │ ├── ApplicationState # App settings & state management
│ │ ├── SambaConfigReader # smb.conf parser
│ │ ├── SambaConfigWriter # smb.conf writer
│ │ ├── SambaService # systemd service control
│ │ ├── Testparm # testparm execution
│ │ ├── SambaUserManager # Samba user management
│ │ ├── SambaUsersModel # User list model
│ │ ├── FirewalldManager # firewalld management
│ │ ├── SambaModel # Share section model
│ │ ├── PDBEdit # pdbedit utility
│ │ ├── ValidUserManager # User validation
│ │ ├── FileDialogHelper # Native file dialog
│ │ ├── FileSelectDialog # File selection helper
│ │ └── main.cpp
│ ├── ScreenQML/ # Screen QML files (14 files)
│ │ ├── Main.qml # Main window & navigation
│ │ ├── WelcomeSambaConfig # Welcome screen
│ │ ├── SambaConfig # Samba config list
│ │ ├── SambaConfigMain # Config editor main
│ │ ├── EditShareWindow # Share edit dialog
│ │ ├── EditShareTab* # Edit tabs (Basic/Advanced/Access/Global)
│ │ ├── SambaTest # testparm execution
│ │ ├── SambaUserSettings # User management
│ │ ├── Firewalld # Firewalld management
│ │ ├── ModeSettings # App settings
│ │ └── AboutQt # About Qt screen
│ ├── CustomQML/ # Custom dialogs (14 files)
│ │ ├── AddUserDialog # Add user
│ │ ├── ChangePasswordDialog # Change password
│ │ ├── DeleteUserDialog # Delete user
│ │ ├── FileSelectDialog # File selection
│ │ ├── FolderSelectDialog # Folder selection
│ │ ├── ErrorDialog/Popup # Error display
│ │ ├── CompletePopup # Success notification
│ │ ├── PasswordDialog # Password input
│ │ ├── SaveDialog # Save confirmation
│ │ ├── QuitDialog # Quit confirmation
│ │ ├── RestartDialog # Restart confirmation
│ │ ├── WarningDialog # Warning display
│ │ └── SSHOptionListView # SSH options
│ ├── JavaScript/ # JS utilities
│ │ ├── ScreenHistory.js # Screen navigation history
│ │ └── ScreenStates.js # Screen state constants
│ ├── Image/ # Icon images
│ ├── i18n/ # Translation files (.ts)
│ ├── qtquickcontrols2.conf # Theme configuration
│ └── CMakeLists.txt
├── SambaConfigHelper/ # D-Bus helper (runs as root)
│ ├── SambaConfigHelper # Main helper implementation
│ ├── SambaConfigAdaptor # D-Bus adaptor (auto-generated)
│ ├── AuthCallback # libsmbclient auth callback
│ ├── PDB # Passdb access
│ ├── dbus/ # D-Bus XML interface definition
│ ├── cmake/ # CMake modules
│ ├── SMB/ # Samba library headers
│ ├── i18n/ # Translation files
│ └── CMakeLists.txt
├── SambaConfigUtility/ # Shared library (libSambaConfigUtility.so)
│ ├── SambaConfigUtility # Utility implementation
│ ├── i18n/ # Translation files
│ └── CMakeLists.txt
├── D-Bus/ # D-Bus config templates (.conf.in, .service.in)
├── Polkit/ # Polkit policy (.policy.in)
├── SELinux/ # SELinux policy (.te, .fc, .if)
├── DeskopEntry/ # Desktop entry (.desktop.in)
├── Scripts/ # Wrapper script (.sh.in)
├── HC/ # Screenshot images
├── ThirdPartyLicenses/ # Third-party licenses
├── packaging/ # Packaging (debian/, rpm/)
└── CMakeLists.txt # Top-level build configuration
- SUSE Linux Enterprise / openSUSE Leap
- Debian 13 Trixie
- Other Linux distributions with the required dependencies
| Dependency | Components | Notes |
|---|---|---|
| Qt 6.2+ | Core, DBus, Gui, Widgets, Quick, QuickControls2, Concurrent, Xml, LinguistTools | qt.io (LGPL) |
| PolkitQt6-1 | Core, Agent | PolkitQt-1 (LGPL) |
| Polkit | - | Polkit (LGPL) |
| libsmbclient | - | Samba client library |
| pkg-config | - | Library detection at build time |
| CMake 3.21+ | - | Build system |
| C++17 compiler | - | GCC 10+ / Clang 12+ |
| Dependency | Purpose |
|---|---|
| selinux-policy-devel policycoreutils (SUSE) | Build SELinux policy module (-DENABLE_SELINUX=ON) |
SUSE Linux Enterprise / openSUSE Leap
sudo zypper install \
qt6-core-devel qt6-dbus-devel qt6-gui-devel qt6-widgets-devel \
qt6-quick-devel qt6-quickcontrols2-devel qt6-concurrent-devel \
qt6-xml-devel qt6-linguist-devel \
polkit-devel libpolkit-qt6-1-devel samba-devel \
cmake gcc-c++ pkg-configDebian 13 Trixie
sudo apt install \
qt6-base-dev qt6-declarative-dev qt6-tools-dev qt6-tools-dev-tools \
libpolkit-qt6-1-dev libpolkit-gobject-1-dev \
libsmbclient-dev samba-client \
cmake g++ pkg-configNote:
You need to build it from source: https://invent.kde.org/libraries/polkitqt-1If Qt 6 or libsmbclient in your distribution is too old, you can also build them from source and specify paths with
-DWITH_POLQT_DIRand-DWITH_SMB_DIRoptions.
cmake -B Debug -S . -DCMAKE_BUILD_TYPE=Debug
cmake --build Debugcmake -B Release -S . -DCMAKE_BUILD_TYPE=Release
cmake --build Release| Option | Default | Description |
|---|---|---|
ENABLE_SELINUX |
OFF |
Build and install SELinux policy module |
ENABLE_WRAPPER_SCRIPT |
OFF |
Install SambaConfig.sh wrapper script |
WITH_POLQT_DIR |
(auto) | PolkitQt6 installation directory |
WITH_SMB_DIR |
(auto) | smbclient library directory |
Example with all options:
cmake -B Release -S . \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_SELINUX=ON \
-DENABLE_WRAPPER_SCRIPT=ON \
-DWITH_POLQT_DIR=/usr/lib64/cmake/PolkitQt6-1sudo cmake --install Release --prefix /usr/localThis installs:
| Component | Path |
|---|---|
| GUI application | /usr/bin/SambaConfig |
| Wrapper script | /usr/bin/SambaConfig.sh |
| D-Bus helper | /usr/libexec/SambaConfigHelper |
| Shared library | /usr/lib64/libSambaConfigUtility.so |
| D-Bus config | /usr/share/dbus-1/system.d/org.presire.sambaconfig.conf |
| D-Bus service | /usr/share/dbus-1/system-services/org.presire.sambaconfig.service |
| PolKit policy | /usr/share/polkit-1/actions/org.presire.sambaconfig.policy |
| Desktop entry | /usr/share/applications/SambaConfig.desktop |
| Icon | /usr/share/icons/hicolor/128x128/apps/SambaConfig.png |
If built with -DENABLE_SELINUX=ON:
# Load the policy module
sudo semodule -i /usr/share/selinux/packages/sambaconfig.pp
# Apply file contexts
sudo restorecon -Rv /usr/bin/SambaConfig*
sudo restorecon -Rv /usr/libexec/SambaConfigHelper
sudo restorecon -Rv /usr/lib64/libSambaConfigUtility*From the desktop menu, or from the command line:
SambaConfig
または
SambaConfig.shNote:
A warning dialog is displayed if the application is launched as root.
It is recommended to run as a normal user - root operations are handled via D-Bus/PolKit.
| Key | Action |
|---|---|
Ctrl+Q |
Quit application |
Shift+Esc / Home |
Return to home screen |
| Mouse Back / Forward | Navigate between screens |
Ctrl+PgUp / Ctrl+PgDn |
Switch tabs in share edit dialog |
Alt+L |
Load firewalld zones |
Alt+R |
Load smb.conf / Reset settings |
Alt+W |
Write smb.conf |
Alt+C |
Execute testparm / Cancel |
Alt+A |
Apply (save) share settings |
Alt+S |
Save settings |
Click the [Samba] button on the main screen.
- Select the path to
smb.confand click [Load] - Sections (
[global],[homes], user-defined shares) are displayed in a list - Double-click a section to open its configuration editor
[global] section:
- Share name
- User and group access privileges
User-defined sections:
- Directory path
- Share name
- Read / write permissions
- Visibility
- Description
- User and group access privileges
Advanced settings (user-defined sections):
- File/directory permissions:
create mask,directory mask,force create mode,force directory mode - Inheritance:
inherit acls,inherit permissions,inherit owner - Access restrictions:
hosts allow,hosts deny,write list,read list,admin users,invalid users - Guest access:
guest ok,guest only - File handling:
veto files,hide dot files,store dos attributes,follow symlinks,wide links - Other:
force user,force group,vfs objects,oplocks,access based share enum
You can configure access control per section:
- Allow all users and groups
- Specify users and groups manually - Select from
pdbeditoutput; group names are prefixed with@
Click the [Samba Test] button on the main screen.
Run testparm to validate the smb.conf syntax.
You can specify custom options and the path to the testparm command.
Click the [Samba User] button on the main screen.
- Add user - Create a new Samba user with
smbpasswd -a - Change password - Change an existing Samba user's password
- Delete user - Remove a Samba user with
smbpasswd -x
User management operations require PolKit authentication.
Click the [Firewalld] button on the main screen.
- Press [Load Zones] to load available firewall zones
- Select a zone from the dropdown
- Press [+] to specify a port number and protocol (TCP / UDP)
- Click [Open Port] or [Close Port]
Start, stop, and check the status of Samba services (smbd / nmbd) from the main screen.
Click the [Mode] button on the main screen.
| Setting | Description |
|---|---|
| Server Mode | ON: Configure locally installed Samba. OFF: Configure Samba on a remote server. |
| Need Administrator Password | When enabled, PolKit authentication is required for all privileged operations. |
| Font Size | Adjust font size (small / normal / large). |
| Dark Theme | Switch between Dark and Light themes. Requires application restart. |
| Language | Switch between English and Japanese. Requires application restart. |
Click the [About Qt] button on the main screen to view Qt version and license information.
- All root-privilege operations are handled exclusively by SambaConfigHelper via D-Bus
- Every D-Bus method requires PolKit authentication (
auth_adminby default) - File path validation prevents path traversal attacks
- D-Bus bus policy restricts service ownership to root
- SELinux policy module available for mandatory access control
This software is licensed under the GNU General Public License v3.0 (GPLv3).
Copyright (C) 2026 Presire
Third-party license files are located in the ThirdPartyLicenses/ directory.
| Library | License | File |
|---|---|---|
| Qt | LGPL-3.0 | ThirdPartyLicenses/Qt/LGPL-3.0.txt |
| Polkit-Qt1 | LGPL-2.0-or-later | ThirdPartyLicenses/Polkit-Qt1/LGPL-2.0-or-later.txt |
| Polkit | LGPL-2.0-or-later | ThirdPartyLicenses/Polkit/LGPL-2.0-or-later.txt |
| Samba | GPL-3.0 | ThirdPartyLicenses/Samba/GPL-3.0.txt |
















