How to share a folder from Windows 10 with SMB

SMB or CIFS It is a veteran protocol that allows you to share resources through a local network, being able to highlight files and printers for end users. At general levels it is easy to enable and use, it is multi-platform because it is supported by Linux (with Samba) and Mac and can be very helpful when you only want to share very specific resources, so taking advantage of the occasion we will explain how to enable it in Windows 10 .

Enabling SMB or CIFS in Windows 10 from PowerShell

SMB can also be enabled from PowerShell, the Microsoft command interpreter. To do this, you must run PowerShell as an administrator looking for the application from the Windows 10 launcher, right-click on its entry (the icon) and then click on "Run as administrator".

Start PowerShell as administrator

Before starting SMB, it would be important to check first if it is enabled, something that can be done with the following command.
Get-SmbServerConfiguration | Select EnableSMB2Protocol
Check if SMB or CIFS is enabled in Windows 10

For enable it You have to enter the following in PowerShell and press enter:
Set-SmbServerConfiguration -EnableSMB2Protocol $true
While for disable it the following should be written (or better copied and pasted):
Set-SmbServerConfiguration -EnableSMB2Protocol $false

Sharing a resource

With SMB already enabled, you can proceed to share a resource (we will make the example of a folder) through the local network. First and to share to other operating systems (in Windows 10 the Everyone group can work) it would be convenient create a local user with password In Windows 10 it will be used to access from other operating systems.

Add the user in Windows 10 to share from SMB or CIFS

Within the creation section, users click on “Add another person to this team” and “I don't have this person’s login information"

Create a local user in Windows 10

In the next window click on “Add a user without a Microsoft account"

Create a local user in Windows 10

The User data, with a name without spaces and with a written password, then click on the Next button.

Create a local user in Windows 10

With the user already created you can start sharing resources. In our case, we have shared a folder called Shared Documents located in the documents of the main user (not just created) of Windows 10. To do this, you have to right-click on the folder and click on Properties.

Share a folder through SMB or CIFS

Within the Properties of the folder click on the Share tab and then about him Share button which appears in the "Sharing folders and network files" section.

Share a folder through SMB or CIFS

In the window that appears you have to select the created user to share via SMB (in our case, "shared") and click on the Add button.

Add the user created for SMB or CIFS

In the next step you have to define the permissions that the user has created on the share. It is not necessary to grant permissions of writing indiscriminately, but it is important to analyze carefully each case to avoid dislikes. Once the permissions have been set, click on the button Share.

Granting permissions to the user created on the share

Back to the Properties of the folder, now you have to go to “Advanced Sharing"

Accessing advanced sharing

Once inside, click on the option “Share this folder"And then on the" Permissions "button.

Sharing a folder through SMB or CIFS

In the next step you have to click on the “Add”To add the user created for the share.

Add user to share

Once inside the "Select Users or Groups" section, click on the buttons "Advanced options" and "Search now", then search and select the created user partly bottom. After doing everything mentioned in this paragraph, click on the “Accept” button.

Advanced sharing options

Advanced sharing options

After carrying out all the steps described, you have to press successively on the “Accept” button until you close the Properties of the folder, although making sure the permissions that you want to grant to the user created on the shared resources. Here it would be important that they were in accordance with the provisions of “Access to the network”.

User permissions created on the share via SMB or CIFS

Accessing the share from Ubuntu

To access the shared folder from Ubuntu (or another distribution with GNOME and the SMB client installed) you have to open the system file explorer and go to the “Other locations” section. Once inside you have to enter at the bottom that you want to access with the SMB protocol (smb: //) next to the IP of the Windows computer, which can be obtained by entering the command “ipconfig” (without quotes) in PowerShell.

Accessing the share from Windows 10 through Ubuntu

IP of the Windows 10 computer that you share via SMB or CIFS

If the address of the source computer of the shared resource has been correctly entered, the Ubuntu file explorer will ask for the credentials to access. In this step you enter the name and password of the user created (in our case, "shared") next to the workgroup (Domain), which by default in Windows 10 is WORKGROUP. After completing the form, click on the Connect button to access the share.

Accessing the share from Ubuntu

Accessing the share from Ubuntu

Click to rate this entry!
(Votes: 0 Average: 0)
Share!

Leave a Comment