> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SMB hardening

> Turn off SMB file sharing on your Macs, so that they share no folder over the network.

The SMB hardening control turns off File Sharing (SMB) on your Macs and keeps it off. No folder of the Mac is shared over the network, even if an employee turns File Sharing on in **System Settings**.

## Platform compatibility

| macOS | Windows | Linux | iOS / iPadOS | Android |
| - | - | - | - | - |
| ✅ | | | | |

Requires macOS 15 or later.

## Set up the control

**1. Add a configuration**

Go to **MDM** > **Controls**, open **SMB hardening**, then click **Add configuration**.

**2. Review the setting**

There's nothing to fill in: the configuration turns File Sharing off.

**3. Select targeting**

Choose which devices to apply the configuration to: all macOS devices, specific device groups, or a custom target. Click **Activate** to deploy the configuration. **Save** keeps it inactive.

## Settings

| Setting | Value |
| - | - |
| **File sharing off** | **On** |

File Sharing (SMB) is turned off and stays off on the Mac: no folder of the Mac is shared over the network.

## How it works

Primo runs a script on each Mac and checks the result with a policy.

* The script records whether the Mac's SMB server was turned on, then stops it and keeps it from starting again.
* The policy fails as soon as the Mac listens for SMB connections again, for example when someone turns File Sharing back on, and Primo runs the script again.

The control only covers the Mac sharing its own folders. Employees can still connect to file shares on other computers and servers.

When you remove the configuration, Primo puts File Sharing back as it was before the control.

## Modify or remove the control

Open the control from **MDM > Controls** to edit, deactivate or replace the configuration.

## Related articles

* [Controls overview](https://docs.getprimo.com/mdm/policies/overview.md)
* [System services](https://docs.getprimo.com/mdm/policies/system-services.md)
* [Firewall](https://docs.getprimo.com/mdm/policies/firewall.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.