IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
25.34k stars 1.37k forks source link

[Bug] SMB shares made on CasaOS are no longer working on Win 10 & 11 computers #1779

Open strassenberg opened 5 months ago

strassenberg commented 5 months ago

Describe the bug

A clear and concise description of what the bug is. Due to the changes in MS Win 10 and 11, guest (anonymous) smb shares are no longer supported and require a series of changes to do every time such Windows PC restarts. This is really super annoying. Please add option to have credentials for the shares. Even one user and pass for all of them.

To Reproduce

Steps to reproduce the behavior:

  1. Create a folder share on CasaOS .
  2. Copy the smb path.
  3. Open that path in the file explorer on Win 10 or 11.
  4. User credentials windows will pop-up.
  5. Leave empty or put Guest as a user.
  6. Error will show up stating that network share is not available.
  7. Only option to access would be change the policies in the Regedit and enable SMB 1.
  8. After 5-15 minutes shares will be available. Expected behavior

Important: On MacOS and other linux computers there is no issue at all and they all are able to connect.

A clear and concise description of what you expected to happen. Problem would be solved if CasaOs had an option to set user and password for the created share. Or at least one user and pass for all the shares.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

System Time

Run timedatectl and share the output

(timedatectl output here)

Logs

Run following command to collect corresponding logs:

sudo journalctl -xef -u casaos-gateway
sudo journalctl -xef -u casaos-user-service
sudo journalctl -xef -u casaos-local-storage
sudo journalctl -xef -u casaos-app-management
sudo journalctl -xef -u casaos.service

Additional context

Add any other context about the problem here.

If you are a Zimaboard user, make it explicit with when you got your Zimaboard.

ilongli commented 5 months ago

I meet the same problem on my Windows Server 2022 Standard 21H2, but my Win 10 22H2 is fine. My solution is add credentials for the samba:

  1. Find the /etc/samba/smb.conf, configure like below: Image
  2. Add user for samba: user add usertest smbpasswd -a usertest
  3. Restart the samba: systemctl restart smb

However, maybe you can also try to allow the guest access for the Windows: https://learn.microsoft.com/zh-cn/troubleshoot/windows-server/networking/guest-access-in-smb2-is-disabled-by-default#resolution