Prepare, validate, and inspect the Samba file-server service
Source: target-root/usr/local/libexec/solidgroundux/manage-samba-file-server.sh
Prepare, validate, and inspect the Samba file-server service
Public functions
- Write Samba configuration settings to the generated configuration output.
- Write one Samba configuration setting to the generated configuration output.
- Dispatch command-line options to the appropriate management workflow.
Internal functions
| Function | Purpose | Arguments | Output |
|---|---|---|---|
_load_ad_management | Load shared Active Directory discovery APIs. | — | — |
_dryrun_complete | Report the dry-run result without executing the requested host change. | — | — |
_smb_refresh_storage_paths | Refresh Samba storage paths using the saved storage configuration. | — | — |
_smb_require_storage | Require the configured Samba storage mount to be available. | — | — |
_smb_list_managed_shares_raw | Enumerate managed Samba shares from the current Samba configuration. | — | — |
_smb_ask_selection | Keep selection mechanics local while the manager owns the surrounding UI layout. | - --label TEXT | — |
_smb_auth_mode | Report Samba's active authentication mode independently of the Linux host's | — | Writes "ad" when Samba security is ADS, otherwise "standalone". |
_smb_validate_hostname_dns | Confirm the DNS state required for clients to reach the Samba server by hostname. | — | — |
_smb_write_auth_config | Keep share definitions intact while replacing only SolidGroundUX-owned global | - $1 Authentication mode: ad or standalone. | — |
_smb_enable_sssd_samba_password_sync | Enable SSSD's Samba machine-account password synchronization for the joined domain. | - $1 Joined AD realm. | — |
_smb_establish_ads_trust | Populate or repair Samba's own machine-account trust after the AD-client module has | - $1 Joined Active Directory realm. | — |
_smb_configure_authentication | Configure Samba for the authentication model already established on the host. | — | — |
_smb_install_packages | Install packages needed for the selected Samba server role. | — | — |
_smb_validate_storage | Validate the configured storage mount before Samba provisioning. | — | — |
_smb_prepare_share_root | Prepare the configured Samba share root with required permissions. | — | — |
_smb_start_service | Start or enable the Samba file-server service through the service manager. | — | — |
_smb_prepare_file_server | Run the ordered Samba file-server preparation workflow. | — | — |
_smb_validate | Validate Samba file-server configuration and runtime state. | — | — |
_smb_status | Display Samba package, service and configuration status. | — | — |
_run_action | Dispatch the requested management action to its implementation. | - $1: Management action to execute. | — |
Description
Implements persistent Samba file-server management actions exposed by the 30-samba-file-server Management Console module. Share lifecycle/share-level access remain in manage-samba-shares.sh; directory lifecycle/access remain in manage-samba-directories.sh.
Usage
Run the executable from its shell command (or installed wrapper):
manage-samba-file-server --action prepare
manage-samba-file-server --dryrun --action prepare
manage-samba-file-server --action validate
Script-specific options:
--action NAME,-a: Management action (supported actions:prepare,install,authentication,storage,share-root,service,validate,status).
