How to disable less secure legacy dialects on RHEL 8 CIFS client?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux (RHEL) 8

Issue

  • How to disable less secure legacy dialects on RHEL 8 CIFS client?
  • How to disable (CIFS/SMB1 and vers=2.0)?

Resolution

  • To disable less secure legacy dialects when loading the CIFS module.
# modprobe cifs disable_legacy_dialects=1 
  • To disable less secure legacy dialects when the CIFS module is already loaded.
# echo 1 > /sys/module/cifs/parameters/disable_legacy_dialects

Y or 1  stands for enabled
N or 0 stands for disabled

Also if you want the change to be persistent after reboot, create the file /etc/modprobe.d/cifs.conf and add the below line:

options cifs disable_legacy_dialects=1 
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.