No edit summary |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 20: | Line 20: | ||
== SMB protocol enable / disable == | == SMB protocol enable / disable == | ||
[https://learn.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3?tabs=client MS Learn enable / disable SMB protocols and check status] | [https://learn.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3?tabs=client 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:<syntaxhighlight lang="powershell"> | |||
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters | |||
DWORD name: DisableStrictNameChecking | |||
DWORD value: 1 | |||
</syntaxhighlight>Powershell Script from link above to automate the process:<syntaxhighlight lang="powershell"> | |||
$altNames = @("<old_host_name>","<old_host_name>.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 | |||
</syntaxhighlight> | |||
Latest revision as of 12:20, 30 January 2025
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
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:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
DWORD name: DisableStrictNameChecking
DWORD value: 1
Powershell Script from link above to automate the process:
$altNames = @("<old_host_name>","<old_host_name>.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