Information
The Samba daemon allows system administrators to configure their Linux systems to share file systems and directories with Windows desktops. Samba will advertise the file systems and directories via the Server Message Block (SMB) protocol. Windows desktop users will be able to mount these directories and file systems as letter drives on their systems.
If there is no need to mount directories and file systems to Windows systems, then this package can be removed to reduce the potential attack surface.
Solution
Run the following command to stop smb.service and remove samba package:
# systemctl stop smb.service
# dnf remove samba
-OR-
-IF- the samba package is required as a dependency:
Run the following commands to stop and mask the smb.service :
# systemctl stop smb.service
# systemctl mask smb.service
Impact:
There may be packages that are dependent on the samba package. If the samba package is removed, these dependent packages will be removed as well. Before removing the samba package, review any dependent packages to determine if they are required on the system.
-IF- a dependent package is required: stop and mask the smb.service leaving the samba package installed.