OSETC TECH

How To Configure Samba Server to Use SMBv2 or SMBv3 Protocol in Linux

This post will guide you how to configure Samba Server to use SMBv2 or SMBv3 protocol in Linux operating system. How to disable the SMBv1 protocol in your Samba server on a Linux operating system. If you can disable SMBv1 protocol in your Linux Samba Server.

The samba daemon provides the Active Directory services and file and print services to SMB clients. The configuration file for this daemon is described in smb.conf.
The smb.conf file is a configuration file for the Samba suite. smb.conf contains runtime configuration information for the Samba programs. The complete description of the file format and possible parameters held within are here for reference purposes.

Configure to Use SMBv2/SMBv3 on Smaba Server


If you want to enable SMBv2 or SMBv3 protocol on your Samba server, you need to edit the configuration file of smaba server, it is located in /etc directory, and it is called smb.conf. Just do the following steps to edit it:

Step1: open /etc/smb.conf configuration file with vi or vim text editor, type:

$ vim /etc/smb.conf

Step2: you need to find the [global] section in smb.conf file and append the following line in:

min protocol = SMB2

Note: if you only want to enable SMB2 protocol, you need to append the following line:

protocol = SMB2

And if you want to enable SMB3 protocol only, and you need to append the following line:

protocol = SMB3

Step3: Save and close the file. and then you need to restart the Samba Service with the following command:

For CentOS or RHEL Linux:

$ sudo systemctl restart smb.services

For Ubuntu or Debian Linux:

$ sudo systemctl restart smbd.services

If you want to know how to install and configure Samba on Ubuntu Linux, just refer to the below link:

Conclusion


You should know that how to disable SMBv1 protocol and enable SMBv2 or SMBv3 protocol in a Samba server on your CentOS or Ubuntu Linux. If you want to see more detailed information about Samba, you can directly go to its official web site.