Smb Client

I realize this is not a very exciting post, especially compared to my other wonderful musing on this site, but I felt I really had to write it to share the pain!

  1. Smb Client Android
  2. Smb Client Log

A colleague I work with needed to enable this feature on an Azure Windows Server 2019 machine to communicate with some old system that only supports Server Message Block version 1 (SMB1). Easy enough to add that right?

Trying the installation

Let’s first get some information about the feature:

  • Samba Client for Windows – smbclient.exe – v3.6.25. So in reference to getting Pydio working on a Windows Server 2012 R2 machine with IIS 8.5 I found that I wanted a workspace in Pydio to access a existing share on a 2012 R2 file server. I have a lot of files I don’t want duplicated on both servers. Now there are many workspace drivers.
  • Server Message Block (SMB) is a network file sharing and data fabric protocol. SMB is used by billions of devices in a diverse set of operating systems, including Windows, MacOS, iOS, Linux, and Android. Clients use SMB to access data on servers.
  • Smbclient is a client that can 'talk' to an SMB/CIFS server. It offers an interface similar to that of the ftp program (see ftp(1)). Operations include things like getting files from the server to the local machine, putting files from the local machine to the server, retrieving directory information from the server and so on.

The output:

Notice the State property? The feature is disabled and the payload (installation files) are not on the Azure virtual machine.

Smb client port

SMB is a client-server interaction protocol where clients request a file, and the server provides it to the client. It is now a Windows-based network that gives users to create, modify and delete the shared files, folders, printers within the network. SMB is an application layered protocol that uses TCP Port 445 to communicate.

When you try to install the feature, you get:

I guess I need the Windows Server 2019 sources!

Downloading Windows Server 2019

I downloaded Windows Server 2019 (November 2019 version) from https://my.visualstudio.com/Downloads?q=SQL%20Server%202019. I am not sure if you can use the evaluation version of Windows Server 2019 because I did not try that. I downloaded the ISO to the Azure virtual machine.

Mount ISO and copy install.wim

On recent versions of Windows, you can right click an ISO and mount it. In the mounted ISO, search for install.wim and copy that file to a folder on your C: disk like c:wim. Under c:wim, create a folder called mount and run the following command:

The contents of install.wim is now available in c:wimmount. Now don’t try to enable the feature by pointing to the sources with the -source parameter of Enable-WindowsOptionalFeature. It will not work yet!

Patch the mounted files

The Azure Windows Server 2019 image (at time of writing, June 2020) has a cumulative update installed: https://support.microsoft.com/en-us/help/4551853/windows-10-update-kb4551853. For this installatin to work, I needed to download the update from https://www.catalog.update.microsoft.com/home.aspx and put it somewhere like c:patches.

Now we can update the mounted files offline with the following command:

It will take a while to update! You need to do this because the files mounted from the downloaded ISO do not match the version of the Windows Server 2019 image. Without this update, the installation of the SMB1 feature will not succeed.

Enable the SMB1 feature

Now we can enable the feature with the following command:

You will need to reboot. After rebooting, from a PowerShell prompt run the command below to check the installation:

The State property should say: Enabled

Smb Client Android

Conclusion

Something this trivial took me way too long. Is there a simpler way? Let me know! 👍

Smb Client Log

And by the way, don’t enable SMB1. It’s not secure at all. But in some cases, there’s just no way around it.

Comments are closed.