Hi, i am trying to set up a shared folder on my local network so i can watch movies on my tv. I followed some guides and i already have samba configured but when i go to my file manager(nemo) and go to the option to share file i get this error message: **"compartilhamento de rede de usuário" retornou erro 255: net usershare: usershares are currently disabled**.
english translation = **"user network sharing" returned error 255**
My samba.conf file:
Summary
[global]
map to guest = Bad User
usershare allow guests = yes
hosts deny = 0.0.0.0/0
hosts allow = 192.168.0.0/16
[sharing]
comment = Arquivos Computador
path = /mnt/a3a6ada3-b5fc-43d2-b4ee-e38f248a9ce8/Emulators
read only = yes
browseable = yes
guest ok = yes
force user = chloe
force group = chloe
I tried searching the error online but couldn’t find much about it and the few suggest solutions that i found where from very old posts and they didn’t work.
Worth to mention that my /var/lib/samba/usershare is empty and that i am also tired so this post is probably poorly written, sorry for that.
… also I would leave out those restrictions in the beginning, and
also you need to use chloe as user on the other machine.
and there is also a security parameter as I can remember.
As with security=user I needed to set up the smb user and assign
an smb user password too
Summary
[global]
workgroup = ynet
security = user
[adata]
comment = adata from andy1 shared
path = /run/media/andy/ADATA/
valid users = andy
public = no
writable = yes
[andy]
comment = user data andy
path = /home/andy/
valid users = andy
public = no
writable = yes
The files are stored in a different device, my system is on a 120gb ssd and my files are on a 1 terabyte hdd.
cifs already installed I suppose ??
yep
from where are you trying to reach the shares ?
An android TV running kodi, i did this before, probably faced the same error but i have a memory problem and i probably forgot to write down how i fixed it. Also thanks for taking your time to help me, really appreciate it.
I tried this but it didn’t work, but i also ““learned”” how to fix it.
Since this is a new install and I am still setting it up I kept my old OS saved in i case a needed anything. So i checked my old OS samba.conf, there i found this:
Summary
Global parameters
[global]
dns proxy = No
log file = /usr/local/samba/var/log.%m
max log size = 50
server role = standalone server
server string = Samba Server
usershare allow guests = Yes
usershare max shares = 100
usershare path = /var/lib/samba/usershare
workgroup = MYGROUP
idmap config * : backend = tdb
include = /usr/local/samba/lib/smb.conf.
[homes]
browseable = No
comment = Home Directories
read only = No
[printers]
browseable = No
comment = All Printers
path = /usr/spool/samba
printable = Yes
I tried this conf and the error message changed to something else, this time it couldn’t find the /var/lib/samba/usershare. That was a easy fix, i just deleted it and created a new file, after this i got a permission error but after i made myself the owner of the file it worked!.
But now i have no idea what exactly made it work, i tried butchering down some parts of this old config into my new one but it didn’t work.
In some systems you need to make and configure the usershare and after doing that you need to define it on the samba.conf. After i did this the first error got fixed, but another showed up, it was due to the “hosts deny = 0.0.0.0/0” part, after i removed it it start working again.
After learning this i made a new samba.conf, and this one is working just need to check to see if the tv recognize it.
new samba.conf:
Summary
[global]
dns proxy = No
log file = /usr/local/samba/var/log.%m
map to guest = Bad User
max log size = 50
security = USER
server role = standalone server
server string = Samba Server
usershare allow guests = Yes
usershare max shares = 100
usershare path = /var/lib/samba/usershare
workgroup = MYGROUP
idmap config * : backend = tdb
include = /usr/local/samba/lib/smb.conf.
So if you reading this and have the same problem as me, just create a usershare folder and point to it in the samba.conf file. If you don’t know how to do that here is a link to the arch wiki that explain it:https://wiki.archlinux.org/title/samba#Enable_Usershares