I have a samba server where I have disabled access to the IPC$
share [1] for security reasons (users and shares enumeration, user info query, ...).
I can access the data shares on this server without problem from any Unix based computer with mount.cifs
. However, when I try to access them from Windows computers (tested with Windows 7 and 10), I get an Access denied error just after providing my credentials.
After recording the SMB traffic, I noticed that Windows computers always do a Tree connect request
on the IPC$
share before trying to access the share I provided (through map network drive or add network location). My samba server returns Access denied for the IPC$
share and Windows never tries to access the share I want.
So my question is how can I prevent Windows to do this useless request on IPC$
and just access the share I provided? Or at least how can I force Windows to access the real share after the IPC$
one returned Access denied?
Thank you in advance for your help and happy holidays!
Sponge bob
[1] https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/securing-samba.html#id2618877