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

[Issue] SMB Sharing needs to support/enforce authentication #1113

Open
iAlchemy opened this issue May 22, 2023 · 22 comments
Open

[Issue] SMB Sharing needs to support/enforce authentication #1113

iAlchemy opened this issue May 22, 2023 · 22 comments

Comments

@iAlchemy
Copy link

Description

Presently any created shares are public. I accept that CasaOS is designed to be a personal home cloud however share security should require the credentials used for the Admin GUI.

Presently a typical share is configured ...

[Documents]
comment = CasaOS share Documents
public = Yes
path = /DATA/Documents
browseable = Yes
read only = No
guest ok = Yes
create mask = 0777
directory mask = 0777
force user = root

It should not include public or guest, instead it should include ...

valid users = username

where username is the Admin GUI user. Perhaps the "Share Folder" dialog could have the option to allow public/guest access else it includes force user by default.

In the meantime ... where is the smb.conf template stored such that I could change it before creating shares?

Additional Information

 - OS: linux
 - CasaOS Version: 0.4.3
 - Disk Total: 225140 
 - Disk Used: 2677 
 - System Info: [Debian GNU/Linux 11   \l Bit:64 Mem:7811M Core:4 Linux casaos 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux]
 - Remote Version: 0.4.3
 - Browser: Chrome 
 - Version: 113.0.0.0
@ETWang1991
Copy link

Got it

@ETWang1991 ETWang1991 removed their assignment Jun 28, 2023
@DouglasMacKrell
Copy link

Just picked up a Zimaboard and started running Casaos for the first time - and was pretty surprised to find that the only way I could connect to my shared folder from my Mac was through a un-authed Guest connection.

@morrolinux
Copy link

morrolinux commented Nov 21, 2023

A "SMB users and permissions" panel in CasaOS would be ideal, but in the meantime, I think the default should be to at least let the user authenticate with the same credentials as the web UI, that's a pretty reasonable and straight forward default config to implement.

@adam-lagoda
Copy link

Any updates on the topic?

@cmartorelli
Copy link

+1 for a update on this issue

@bilalbayasut
Copy link

bilalbayasut commented Jan 31, 2024

I was surprised as well that the samba is not yet authenticated, so +1 for update on this issue

@HackerPVPLOL
Copy link

+1 for update on this issue

@adam-lagoda
Copy link

Seems like a pretty straightforward implementation https://ubuntu.com/server/docs/samba-share-access-control

@thor9898
Copy link

thor9898 commented Feb 7, 2024

This is highly needed.

@Tronicgg
Copy link

Tronicgg commented Mar 2, 2024

Highly needed indeed.

@baffee
Copy link

baffee commented Mar 11, 2024

In the release note of 0.4.7, it mentioned enforce authentication is avaible. How to config it?

@ksdfpr
Copy link

ksdfpr commented Mar 21, 2024

Any update on this? Highly recommended!

@tuvietnamm
Copy link

any update on this?

@JPLoureiro83
Copy link

What a letdown, everything is wide open for everyone, from any device connected to the same network.
This leaves me no choice but to go find another alternative and stop using CasaOS altogether. What a shame... Please fix this!

@cmartorelli
Copy link

I installed Samba and set it up with the correct amount of users and then I deleted the Samba config file that Cassa OS installed. That did the trick.

@adam-lagoda
Copy link

I installed Samba and set it up with the correct amount of users and then I deleted the Samba config file that Cassa OS installed. That did the trick.

Can you link a step by step solution please?

@cmartorelli
Copy link

I am by no means a SAMBA expert so I really don't have step by step instructions. But it was something like this...
find the SAMBA conf file that CASA OS created it should be in /etc/samba/smb.conf. rename it or delete it.
Then I followed these instructions ...https://ubuntu.com/tutorials/install-and-configure-samba#1-overview

@adam-lagoda
Copy link

But wouldn't CasaOS overwrite your changes? You might need to lock the file to get consistent functionality

@tuvietnamm
Copy link

changing the /etc/samba/smb.casa.conf did the trick for me.
guest ok = no
then sudo smbpasswd -a username to set a password for username (same as casaos)

@strassenberg
Copy link

then sudo smbpasswd -a username to set a password for username (same as casaos)

Hi tuvietnam!
Propably did something stupid, but when I try to add users, got errors:

root@casaos:~# sudo smbpasswd -a ray  
New SMB password:
Retype new SMB password:
Failed to add entry for user ray.

Any idea?

@johnMaluco
Copy link

The exact same thing happened to me too.

@Makc0809
Copy link

+1, just wait update ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Future
Development

No branches or pull requests