6

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: enter image description here

Windows 10 local security policy settings just corrected as per the following instruction: enter image description here

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
3
  • What do Windows's logs say (computer management -> Windows event log(?) -> ...)
    – Limer
    Commented Jul 14, 2023 at 10:40
  • 1
    Share permissions are authorization rules. You have problems with authentication.
    – Daniel B
    Commented Jul 14, 2023 at 10:47
  • RE: What do Windows's logs say. I don't know where to check but I've checked every possible items, and all of their latest event timestamps are much older than my latest firing, and none of them are related to my request. And Daniel, I agree with you theoretically but you can see that all the answers are trying to address such problem. Do you have anything specific?
    – xpt
    Commented Jul 14, 2023 at 13:38

2 Answers 2

5

Ensure the shared folder is properly configured on the Windows 10 machine:

Open the Folder Properties dialog for the shared folder.

In the Sharing tab, click on the "Advanced Sharing" button.

Check the box for "Share this folder" and provide a share name.

Click on the "Permissions" button and ensure that "Everyone" is listed with "Full Control" access.

Check the Windows 10 local security policy settings:

Open the Local Security Policy on the Windows 10 machine.

Navigate to "Local Policies" > "Security Options".

Look for the policy named "Network access: Sharing and security model for local accounts" and ensure it is set to "Guest only - local users authenticate as Guest".

Try different mount options on your Debian client:

Open a terminal on your Debian machine and use the following command to mount the Windows share:

sudo mount -t cifs //servername/sharename /media/windowsshare -o guest,iocharset=utf8

If the above command doesn't work, you can try specifying the vers option to force a specific SMB version:

sudo mount -t cifs //servername/sharename /media/windowsshare -o guest,iocharset=utf8,vers=1.0

Verify firewall settings:

Check the Windows 10 firewall settings to ensure they allow incoming connections from your Debian client.

Ensure that any third-party security software or antivirus programs on the Windows machine are not blocking the network access.

If you continue to encounter issues, please provide any error messages or further details so we can help you.

2
  • Oh, thanks. I gave nounix a try but got the same STATUS_ACCESS_DENIED error. And this is after rebooting Windows as well. Thanks again for the detailed reply. I'll poke around more...
    – xpt
    Commented Jul 14, 2023 at 2:12
  • 4
    I finally made it!!!!!! the option is not -o 'guest' but -o 'user=,pass='!!!! Thanks again to have covered all setups that I should had done!!! and welcome aboard with my +25. Suggestion: update your answer to include the correct option, and maybe mention the Let "Everyone permissions" apply to anonymous users" if you think it is also necessary.
    – xpt
    Commented Jul 14, 2023 at 13:48
3

It may be related to Windows's group policy "Network access: Let "Everyone permissions" apply to anonymous users" @ Computer Configuration\Windows Settings\Security Settings\Local Polices\Security Options

It's disabled by default and my be the culprit in your case.

2
  • Thanks! I noticed that too -- there are two version of my screenshot, the first one was i.sstatic.net/lnONJ.png, but from my current screenshot, you can see that the Let Everyone permissions apply to anonymous users security policy setting has been Enabled. But, upvoting!
    – xpt
    Commented Jul 14, 2023 at 13:55
  • @xpt - Thx. I'm used to a different Windows language - had too look up the English stuff -> may have only looked at the selected row in your screenshot and/or forgot to verify after finding the English translation. :-/
    – Limer
    Commented Jul 14, 2023 at 23:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .