Skip to content
TrySitePrice

How to configure Samba to use SMBv2 and disable SMBv1 on Linux or Unix

Best/Tutorial

To configure Samba to use SMBv2 and disable SMBv1 on Linux or Unix, you need to modify the Samba configuration file, usually located at /etc/samba/smb.conf. Here are the steps:

  1. Open the Samba configuration file using a text editor:
sudo nano /etc/samba/smb.conf
  1. Add the following lines to the end of the file:
min protocol = SMB2
max protocol = SMB3
  1. Save the changes and close the file.
  2. Restart the Samba service for the changes to take effect:
sudo service smb restart
  1. Verify that SMBv1 is disabled by using the following command:
smbclient -m SMB3 -L localhost

You should see a message indicating that the minimum protocol version supported by server is SMB 2.002. This confirms that SMBv1 is disabled and that Samba is using SMBv2 by default.