To configure Samba to use SMB version 2 (SMBv2) and disable SMB version 1 (SMBv1) on Linux or Unix, you will need to perform the following steps:
/etc/samba/smb.conf
, and add the following line to the global section:server min protocol = SMB2
Save the changes to the configuration file and exit the text editor.
Restart Samba to apply the changes:
systemctl restart smbd
Note that some older SMB clients may not support SMBv2, and will not be able to connect to the Samba server.