Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-09-19 01:00:43

timeshift
Member
Registered: 2022-08-21
Posts: 38

[SOLVED] “net usershare” has returned error 255

Could someone tell me why when I try to share a directory through thunar-shares-plugin the log.net tells me that the resource I am trying to share contains invalid characters when the resource in its name does not have any of these symbols or characters?

net usershare add: share name /home/user/Downloads contains invalid characters (any of %<>*?|/\+=;:",)

This also happens to me when I try to share the Documents, Music and Images directory.

I have configured samba in the best way and on other computers with different distribution of Ubuntu and Debian, but it is the first time I see this message, of coursethe first message that usually appears is the following: "net usershare" has returned error 255

I use xubuntu 22.04.1
xfce version 4.16
samba Version 4.15.9-Ubuntu

Thanks for your help

Last edited by timeshift (2022-09-24 22:18:10)


xubuntu 22.04.4 LTS
xfce version 4.16

Offline

#2 2022-09-19 11:38:05

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: [SOLVED] “net usershare” has returned error 255

How did you install thunar-shares-plugin in xubuntu 22.04? The package is not in the repositories.

Have you tried using the command line to create a user share (and https://wiki.archlinux.org/title/samba# … Usershares) to see if works without thunar?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-09-19 17:59:01

timeshift
Member
Registered: 2022-08-21
Posts: 38

Re: [SOLVED] “net usershare” has returned error 255

Hi @ToZ

I have compiled thunar-shares-plugin with the instructions given in the following link, also I have checked that the configuration made for the samba server works in the CLI by running the following command:

net usershare add Public /home/$USER/Downloads : Everyone:F guest_ok=y

.

I extracted this information from a user's community on the ubuntu mate forum.

This command allows me to share one directory at a time, it can be the Downloads directory, Images, Documents or simply any other under the name Public or also my own user directory.

The drawback arises when I want to use the thunar plugin for this purpose so I can not only share one resource but several at the same time and thus avoid sharing the entire user directory using the GUI. Also as I described in the beginning of this post in each directory that I want to share, the log.net appears indicating me an error that does not exist. Thanks for your help in solving this problem.

Last edited by timeshift (2023-02-27 19:21:14)


xubuntu 22.04.4 LTS
xfce version 4.16

Offline

#4 2022-09-19 20:31:52

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: [SOLVED] “net usershare” has returned error 255

I see. Have a look at this bug report. Since you are building from source, you can easily apply the patch (which changes the "-l" passed parameter to "--long").


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2022-09-24 22:07:30

timeshift
Member
Registered: 2022-08-21
Posts: 38

Re: [SOLVED] “net usershare” has returned error 255

Thanks for the help, I was able to solve the problem by adding to the file shares.c the parameter

argv[1] = "--long";

located in the libshares directory. I compiled the plugin again and now everything works as it should.

Last edited by timeshift (2022-09-24 22:21:13)


xubuntu 22.04.4 LTS
xfce version 4.16

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 10 queries executed - Memory usage: 536.65 KiB (Peak: 537.49 KiB) ]