Skip to content
File Share

File Share

Unable to access File share server 2019 2022

Check the following services are running and not disbaled:

  • DNS Client
  • Function Discovery Resource Publication
  • SSDP Discovery
  • UPnP Device Host

Allow network discovery in the windows firewall in the network security settings.

For Samba file shares install the feature SMB 1.0/CIFS Client if the share is on an older device such as a router

  • Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client
  • Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

Enable insecure guest logins via local group policy:

  • Computer Configuration -> Administrative templates -> Network -> Lanman Workstation > Enable insecure guest logins - enable

SMB protocol enable / disable

MS Learn enable / disable SMB protocols and check status

Unable to access file share due to host name mis-match

If there have been migrations from one domain to another domain file shares may be accessed on old DNS records that have been re-pointed. The Hostnames will then not match the new servers that the connections are pointing to. To fix this you can disable strict name checking.

https://4sysops.com/archives/disable-strict-name-checking-with-powershell/

Or change/add the following reg key:

1
2
3
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
DWORD name: DisableStrictNameChecking
DWORD value: 1

Powershell Script from link above to automate the process:

1
2
3
4
5
6
7
8
$altNames = @("",".domain.local")
$hostName = hostname
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa -Name DisableLoopbackCheck -PropertyType DWord -Value 1
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 -Name BackConnectionHostNames -PropertyType MultiString -Value $altNames
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters -Name OptionalNames -PropertyType MultiString -Value $altNames[0]
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters -Name DisableStrictNameChecking -PropertyType DWord -Value 1
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters -Name DnsOnWire -PropertyType DWord -Value 1
setspn -A host/$altNames[0] $hostname