Project

General

Profile

How to Fix "Weak Crypto is Allowed" in Samba » History » Version 3

Gareth Eaton, 12/18/2023 12:13 AM

1 1 Gareth Eaton
h1. How to Fix "Weak Crypto is Allowed" in Samba
2
3
Certainly! Here's a simplified version for your help wiki:
4
5
**How to Fix "Weak Crypto is Allowed" in Samba**
6
7
If you see the message "Weak crypto is allowed" when running `testparm` for your Samba server, it means that your server is using weak cryptographic settings, which can be a security risk. To fix this issue, follow these steps:
8
9
1. Open the Samba configuration file, usually located at `/etc/samba/smb.conf`, with a text editor. Use a command like `sudo nano /etc/samba/smb.conf`.
10
11 2 Gareth Eaton
2. Inside the `smb.conf` file, find the *`[global]` section* , where you can configure global settings for Samba.
12 1 Gareth Eaton
13
3. Add or modify the following lines in the `[global]` section:
14
<pre>
15
   server min protocol = SMB3_02
16
   server max protocol = SMB3_02
17
   ntlm auth = yes
18
   lanman auth = no
19
</pre>
20
21 3 Gareth Eaton
These settings ensure that Samba uses a secure protocol (SMB3.02) and enables NTLM authentication while disabling weaker LANMAN authentication.
22 1 Gareth Eaton
23
4. Save the changes and exit the text editor.
24
25
5. Restart the Samba service to apply the new configuration. Use a command like `sudo systemctl restart smbd` (command may vary depending on your Linux distribution).
26
27
6. Run the `testparm` command again to verify that the "Weak crypto is allowed" message is no longer displayed.
28
29
By following these steps, you'll improve the security of your Samba server by disabling weak cryptographic algorithms.