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

Originally published at:

I am a new Linux user and for security reasons and to avoid ransomware, I would like to disable the SMB1 protocol in samba configuration on a CentOS Linux version 7 server. Is it possible to disable SMBv1 on a Linux or UNIX-like operating system?