SMBClient icon indicating copy to clipboard operation
SMBClient copied to clipboard

Connected but could not find share folders on windows network

Open TechnosoftIE opened this issue 6 years ago • 5 comments

Hi, I can connect with a machine on windows network but it does not list share folders. The error i get is:

(Error Domain=dsmerror Code=3 "SMB error" UserInfo={NSUnderlyingError=0x14788e40 {Error Domain=nt.error Code=22 "Access denied" UserInfo={NSLocalizedDescription=Access denied}}, NSLocalizedDescription=SMB error})

TechnosoftIE avatar Apr 17 '18 11:04 TechnosoftIE

I can only assume, that "access denied" is indeed the case. Check if the login falls back to guest access.

schamar avatar Apr 22 '18 07:04 schamar

Further investigation: Error occurs on Windows Server 2012. Could it be due to SMB supported version etc on 2012.

TechnosoftIE avatar Apr 23 '18 09:04 TechnosoftIE

Possibly. Currently smb v1 is the only supported option.

schamar avatar Apr 23 '18 09:04 schamar

Confirmed SMB1 is enabled. It does handshake successfully as WireShark capture shows but when listing shares it fails. It works if PC is i workgroup but when in domain it gives AccessDenied. Tried with user who has administrator access in domain and on local system users. But same error.

TechnosoftIE avatar Apr 23 '18 13:04 TechnosoftIE

Can you try to use initWithHost:netbiosName:group: directly on the SMBFileServer and pass the domain as netbiosName?

schamar avatar Apr 24 '18 06:04 schamar