[HOW-TO] Connect to OMV SMB shares with Windows 10 - Remote Mount Update - 5/19/18

    • [HOW-TO] Connect to OMV SMB shares with Windows 10 - w/Remote Mount Update

      In many cases, the issues with Windows 10 connections to OMV Samba shares result from problems with Share settings, Network security settings and the SMB (Server Messaging Block) protocol level. Microsoft continues to change SMB implementations and push changes out to Windows users, among their numerous security updates. This is one of the reasons why a Windows 10 client may see OMV's network shares one day, and they disappear the next.

      While the following measures are not all inclusive, they're offered to help Windows 10 users establish durable network connections between Windows 10 and OMV servers.
      ________________________________________________________

      Windows 10 Client: Enable SMB2 - DisableSMB3

      **Adding items to the Windows registry entails some risk from “Fat Finger” errors. Use caution.**

      Run Windows Power Shell as Administrator (Right click to run as administrator)
      Copy and paste the following lines into the Power Shell window.

      (Do this CLEANLY, ensuring that the entire line is copied and pasted in before hitting Enter.)


      Source Code

      1. Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force
      2. Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 –Force
      3. Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB3 -Type DWORD -Value 0 –Force

      These commands create 3 registry keys and set SMB2 as the operational SMB protocol. With these items added to the registry users can, selectively, turn SMB levels on or off with the registry editor.

      Optional:
      To verify the Power Shell cmdlet made the additions to the Registry, regedit.exe can be used. Browse to the location shown below and check the parameters for SMB1 through 3.

      Regedit.PNG

      For more information see Note 2
      __________________________________________________________________________________________

      Set Private Network
      Make the selections shown.

      systemsecurity.PNG

      Click “Next”.
      A reboot is required.
      __________________________________________________________________________________________

      Set WORKGROUP name
      (In the same location as above:)

      wrkgrpname.PNG

      Click "OK".
      A reboot is required.

      (For more information, see Note 3.)
      __________________________________________________________________________________________

      Set WORKGROUP name in OMV

      - Setting the identical workgroup name in OMV is required.
      - Toggling ON Local master browser is recommended.

      OMV-wrkgrp.png


      __________________________________________________________________________________________

      Advanced Sharing Settings

      Make the following changes to the Private Profile. Leave the Guest or Public and All Networks as they are.

      AdvancedSharingSettings.PNG

      Save Changes

      A reboot is required.
      __________________________________________________________________________________________

      Edit Windows 10 hosts file


      Prerequisite:
      This change requires that the OMV server has a static IP address or a permanent/static DHCP lease.
      __________________________

      -Right click on Notepad and run it as administrator.
      -Set the Text Documents (*.txt) drop down to All Files (*.*)
      -Navigate to C:\Windows\System32\drivers\etc. Open the file “hosts”.

      The following is an excerpt from the default file.
      Add the two lines of text to the hosts file, according to the example below, shown in bold black.
      Enter the IP address of your OMV server. The host name will be the OMV Hostname as it appears in OMV under System, Network, the General tab, in the Hostname field.


      #
      # 102.54.94.97 rhino.acme.com # source server
      # 38.25.63.10 x.acme.com # x client host
      #
      # --Server IP---- Hostname
      192.168.1.50 OMV-SERVER
      #
      # localhost name resolution is handled within DNS itself.
      # 127.0.0.1 localhost
      # ::1 localhost


      **If the hosts file is busy with another process, saving the file may fail. Use Windows 10 safe mode, as explained here, to be able to save the file.**

      See Note 4.
      _______________________________________________________________________________________________________

      Windows is "Windows"

      The previous steps will ensure that mapped network drives will work and, in some cases, network hosts will be revealed in Windows Explorer, under Network. However, on occasion, Windows 10 doesn't discover even other Windows hosts. While Windows 10 has 6 separate services dedicated to network discovery, this long running user thread indicates that there is no solid solution to date for missing hosts and devices. (See the last few posts.)

      To get past this Windows 10 issue, create a Shortcut for your OMV server on the Desktop.

      Right click on the Windows 10 Desktop. Select New, Shortcut. The location will be \\OMV-SERVER (substitute the hostname of your server or use your servers IP address similar to this -> \\192.168.1.50). Click Next.
      Name the Shortcut. (I used the server's name for the shortcut name, to keep it simple).

      When finished, the properties of the short cut should be similar to the following (with your server's hostname or IP address in the Target: field).

      W10shortcut.PNG


      ** For convenience, right click the completed Shortcut icon and pin it to Quick Access and Start. **


      ____________________________________________________________________________________________

      Configuring Remote Mount
      (Applies to OMV 3.X and earlier versions)
      For users who are using Remote Mount to connect OMV to Windows 10 Shares, add ,vers=2.0 at the end of the Options box, as shown. (For more info, see Note 5.)

      remotemount.png

      (**Thanks to @vinntec, for this contribution **)
      ___________________________________________________________________________________________

      See Notes in the next post.
      Good backup takes the "drama" out of computing
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk
      2nd Data Backup: OMV 3.0.99, R-PI 2B, 16GB boot, 4TB WD USB MyPassport - direct connect (no hub)

      The post was edited 40 times, last by flmaxey: minor additions, edits ().

    • [HOW-TO] Connect to OMV SMB shares with Windows 10 - Remote Mount Update - 5/19/18

      **Feedback is welcome by PM or E-mail to omvguide@gmail.com.**
      ____________________________________________________________________________________________


      Notes

      Note 1.
      Add-on client firewalls should be set to “trust” the local network with Medium or Low security settings. Using High security settings, for the local network, can result in clients becoming isolated on the network.

      Note 2.
      The issues with Windows 10 being able to map OMV SMB network shares seem to be related to Microsoft's version of SMB 3.1.1 and later variants. Setting Windows 10 to SMB2 protocols only, in registry keys, avoids surprises where shares may disappear after a newer version of SMB3 is pushed out or when an update changes Windows settings.

      **It should be noted that these settings already exist and are running in the background, in Windows 10. Nothing new is being added. The creation of these registry keys simply make SMB parameters more accessible to users.**

      More information on M$'s implementation of SMB levels is available at:
      https://blogs.technet.microsoft.com/josebda/2015/05/05/whats-new-in-smb-3-1-1-in-the-windows-server-2016-technical-preview-2 ** See Para 4. **

      The change made, turning SMB3 off, can be undone with regedit.exe - Navigate to:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
      Set the data value for SMB3 to "1".
      Value 1 = ON
      Value 0 = OFF

      Due to legitimate security concerns, SMB1 should be off. The Wcry [WannaCry] ransomware virus exploits a weakness in SMB1. This weakness still exists. While Wcry has been functionally neutralized, a day zero virus could be written to exploit SMB1.

      Note 3.
      The default Windows workgroup name is, (drum roll,,,) WORKGROUP. This default name will be in use in the majority of home PC systems. Regardless of the name used, all Windows clients and the OMV server should be set to the same workgroup name. If the workgroup name has been changed and is not configured in Windows 10, network connections to the OMV server may work but network discovery's detection of the OMV server may be significantly delayed.

      Note 4.
      The change to the host file is not required but is recommended. Some applications use host names or server names by default. (This is the case with most Web browsers.) Editing the Windows 10 host file, permanently associates the OMV server's IP address with its' hostname and speeds network connections, without reliance on local DNS or extended discovery processes.

      Note 5.
      The Remote Mount change reflects a security update that causes Windows 10 to reject a negotiation for an SMB1 connection, initiated from a remote host. The addition of ,vers-2.0 in Remote Mount Options, forces SMB2.



      Search Keywords: Win10 , shares , shared , access , openmediavault , problem , access control , network share, how to, can't, can not connect, CIF, samba, fix, don't show, unable, SMBv1, SMBv2, SMBv3, linux, debian host is down, exit code, mount error
      Good backup takes the "drama" out of computing
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk
      2nd Data Backup: OMV 3.0.99, R-PI 2B, 16GB boot, 4TB WD USB MyPassport - direct connect (no hub)

      The post was edited 3 times, last by flmaxey: additional content ().