libsmbclient-go icon indicating copy to clipboard operation
libsmbclient-go copied to clipboard

Cannot authenticate to Windows share using account with no password

Open nlykkei opened this issue 4 years ago • 0 comments

When attempting to authenticate to Windows share using account with no password, I get the following error:

2021/02/22 15:26:35 cannot open smb://10.211.55.5/test_share: operation not permitted

In Windows, I've disabled Password protected sharing in Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings, and everything works using e.g. smbclient and pysmb, but not libsmbclient-go.

I'm using cmd/smb/main.go as the SMB client.

Even by hardcoding the password as "" in main.go, I get the above error.

NOTE: If I set a password for my Windows account, then main.go works by using the specified username/password.

How can I use libsmbclient-go to authenticate to Windows shares using an account with no password?

nlykkei avatar Feb 22 '21 14:02 nlykkei