This is an oldie, but considering it’s unanswered and I was looking into IPC$ and Samba, I will give it a try for the sake of documentation.
Why would smbd not clean up IPC$ shares?
As stated above in the comments to your question, the service is used for remote administration and communication among servers, and particularly in Samba it’s used for some browsing and tcp/ip purposes. Unless you need it for some reason or something doesn’t work, it’s safe to disable it. [1]
Why establish one IPC$ per user connection to a share rather than one
per client connection?
Because a user can have multiple client connections.
Can you disable IPC$ share creation from the client side?
Yes and no. It doesn’t really disable the creation of the IPC$ share, but you can disable access to it from the windows client.[2]
For windows Vista, Windows 7, Windows 8 and Windows 10, you can do the following registry edit:
- Click Start, type “regedit” in the Search box, and then click regedit.exe in the search results. The User Account Control dialog box appears.
- Say “Yes” to the UAC prompt and the Registry Editor should open.
- Open the HKEY_LOCAL_MACHINE branch.
- Open the SYSTEM branch.
- Open the CurrentControlSet branch.
- Open the Services branch.
- Open the LanmanServer branch.
- Select the Parameters branch.
- Select Edit, New, “DWORD (32-bit) Value”
- Type “AutoShareWks” and press Enter. (Leave the default value of 0.)
- Reboot or restart the service using a Command Prompt (DOS or terminal): “net stop server” then “net start server”.
Is there a way to increase the max # connections per share (not that
this would have helped in this case)? I didn’t see it in the docs.
Yes[3]. Below the share just input:
[share]
max connections = ##
Where XX is the number of connections.
Sources:
- [1] https://www.samba.org/samba/docs/old/Samba3-HOWTO/securing-samba.html
- [2] https://www.petri.com/disable_administrative_shares
- [2] https://www.weavweb.net/2015/08/27/disabling-hidden-shares-in-windows-10-windows-vista-windows-7-and-windows-8-1/
- [2] https://support.microsoft.com/en-us/help/954422/how-to-remove-administrative-shares-in-windows-server-2008
- [3] https://www.samba.org/samba/docs/using_samba/ch09.html