Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
strassenberg opened this issue Apr 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@strassenberg
Copy link

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.

@strassenberg strassenberg added the bug Something isn't working label Apr 14, 2024
@ilongli
Copy link

ilongli commented Apr 24, 2024

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

@DrayZZ
Copy link

DrayZZ commented Oct 28, 2024

I propose to make it possible to select authentication when accessing via SMB, two options

  1. guest
  2. user

When using the 2nd option, when creating a directory, it will be possible to create smb - users


The current solution, without editing smb.conf

  1. Create user - useradd USER_NAME
  2. Set user pass - smbpasswd -a USER_NAME
  3. Set user group root - usermod -aG sudo USER_NAME

After these steps, you will be able to use the credentials for SMB share in Windows

@lucasnasc2
Copy link

@DrayZZ that worked perfectly, thanks a lot! Regarding the security problems of having the smbs open for guests, is there something we can do to block guest access without messing with the casaos smb.conf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants