Ubuntu: How to find if SMBv1 is disabled in my ubuntu 14.4?



Question:

A friend of mine is using Ubuntu 14.4 and after reading about the problems with smb1, she wanted to know if it is running on her system and if yes, how to disable it. Because that i work with Windows, i have no idea. Browsing through the world, i saw something about Samba servers but it wasn't really helpful for me. So if someone could tell me where to look (with a fitting command please) and remove it, that would be great.

Thanks!


Solution:1

It depends if she's running Samba in Server mode or not.

And in most setups, Samba is not actually set up to run in Server mode. Though Samba may exist on the computer, it's probably configured more for client mode on Desktops. Samba is also not normally set up in server mode unless you actually try and configure it as a server.


If she is not running Samba in Server Mode...

... then she really doesn't have to worry about anything, unless she mounts Samba shares on her computer. And if she does, then when she mounts CIFS / Samba shares on her computer via the command line, she can specify the minimum version as a mount option (vers=2.0 or a higher version like 2.1 or 3.0).

However, enforcing SMBv2+ for mounts is dependent on the server - not all servers (especially older Windows servers) support SMBv2 or higher.

Standard CIFS / Samba mounts done by the GUI, you can't force specific protocols, those're usually hard-coded somewhere and impossible to edit.


If she is running Samba in Server Mode...

...then she needs to force minimum version SMBv2, like so (thanks to cyberciti.biz FAQs):

# Edit Samba Server configuration  sudo vi /etc/samba/smb.conf    # Add this line under the [global] section in the above file, and save it  min protocol = SMB2    # Close the text editor, and restart the Samba server.  sudo systemctl restart smbd.service  

That will force SMB2 as the minimum protocol supported.

That said, if she runs Samba in server mode, she really should also be running a firewall and filtering access to Samba ports locally on the system so that only trusted hosts can reach her.


Regardless of whether she's running in Server mode or not...

... she should run a firewall like ufw to filter traffic coming into her computer - this way, nobody can really reach her computer on a SMB-speaking port without being added to the allowed list, and only trusted systems should be allowed to reach the system on such ports.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »