This is more a Windows configuration question I think.
Goal: To access Windows 10 public shares from Linux.
In this context: "server" is a single simple standalone Windows 10 machine, and "client" is Debian stable.
I have a folder shared on a windows 10 machine. It is shared with "Everyone" and "Everyone" has "read/write" access. In the security tab of the properties dialog of the folder, again "Everyone" has been given "Full Control". I specifically want this folder to be publically accessible to everyone, IE creating a specific user is not an option. I can access my passwordless \\servername\sharename
from within Windows just fine, however,
I am having problems mounting the shared folder from linux machine. It seems windows 10 is enforcing the access to be a sign up user. Is that so? How to overcome it? My windows 10 is an enterprise edition.
As per https://wiki.ubuntu.com/MountWindowsSharesPermanently
guest indicates you don't need a password to access the share
$ sudo mount.cifs //servername/sharename /media/windowsshare -o 'guest,iocharset=utf8'
mount error(13): Permission denied
# error log:
CIFS: Status code returned 0xc0000072 STATUS_ACCOUNT_DISABLED
Here are also other options that I've tried, from various suggestions I found from internet:
-o 'username=guest,password=,iocharset=utf8'
-o 'user=administrator,password='
-o 'username=Everyone,password=,iocharset=utf8'
-o 'sec=none,iocharset=utf8'
all failed with various errors:
CIFS: Status code returned 0xc0000072 STATUS_ACCOUNT_DISABLED
VFS: cifs_mount failed w/return code = -128
CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
VFS: cifs_mount failed w/return code = -13
CIFS: Status code returned 0xc0000022 STATUS_ACCESS_DENIED
VFS: cifs_mount failed w/return code = -13
I also tried to enable file sharing under "Guest or Public" access in Windows configuration as well, but it isn't working either.
Please help.
UPDATE:
"Everyone" is listed with "Full Control" access:
Windows 10 local security policy settings just corrected as per the following instruction:
And now:
$ sudo mount.cifs -v //servername/sharename /media/windowsshare -o 'guest,iocharset=utf8'
mount.cifs kernel mount options: ip=192.168.0.xx,unc=\\servername\sharename,iocharset=utf8,user=,pass=********
mount error(13): Permission denied
# error log:
CIFS: Status code returned 0xc0000022 STATUS_ACCESS_DENIED
CIFS: VFS: cifs_mount failed w/return code = -13
# and trying to add `,vers=2.1` will get the same result as well.
$ sudo mount.cifs //servername/sharename /media/windowsshare -o 'guest,iocharset=utf8,vers=1.0'
mount error: Server abruptly closed the connection.
This can happen if the server does not support the SMB version you are trying to use.
The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.
mount error(112): Host is down
# error log:
[22997.487658] Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
[22997.494779] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
[22997.505612] CIFS: VFS: cifs_mount failed w/return code = -112
computer management -> Windows event log(?) -> ...
)