'net usershare' returned error 255 when creating a share

Could it be "Shared" (capital S) vs. "shared" (lower-case s) that's tripping it up?

Thanks for the suggestion but no it still does it. Would be interested to see if you can reproduce it?

I have the same error.
New installation.

Zorin OS 16.2 (64) on MacBook Pro with intel processor

Tried everything, samba installed nautilus etc. Permissions set for samba and group.

Nothing works. Tried for hours, don't know what to do next

Just done a websearch using "net-usershare-returned-error-255-when-creating-a-share ubuntu 20.04"

Does this item help: networking - Unable to create Samba shares in 20.04 - Ask Ubuntu

Thanks for the suggestions but that's not the error. The error code is the same however the underlining problem is different.

Its not:

net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. > An invalid combination of parameters was specified.


Contains invalid characters (any of %<>*?|/\+=;:",)

This looks like a nautilus-share issue.

Have you fully ensured that samba is installed?

sudo apt install samba smbclient

Ensure the directory placement:

sudo mkdir -p /var/lib/samba/usershares/

sudo chmod go+rwx /var/lib/samba/usershares/

Set your usergroup:

sudo usermod -aG sambashare $USER

I have the same issue with a Zorin Pro relatively fresh install. I've done some research and it looks like it's a bug in Samba having to do with the -l argument when it should be --long instead. Someone describes the problem and solution here (translated from German) : Samba Nautilus-Share funktioniert nicht mehr - #20 by megavolt - Deutsch - Manjaro Linux Forum

I'm new to Linux so I don't know how to do the solution they describe. I've tried running this command but the machine itself doesn't even show up on the network (from my other Windows machine) :

net usershare add --long share "/media/bledking/Storage/Share/" "comment" "Everyone:R" guest_ok=y
sudo samba restart

I'm stumped :pensive:

If you don't need to see the output, you can omit the -l or --long flags all together.

The other file is too modify nautilus to use the double hyphen version of the flash instead of the single. This may be necessary for any file browser you use.

Copy the script to a text file and name it as they did. Then call bash pkgname and it will modify the config for you.

This is definitely something that should be looked into. I actually had this problem myself yesterday on my desktop and laptop with Zorin Core. Have not spent the time to find a solution yet. If I do I will post it here.

1 Like

same problem here, found this Join Active Directory / LDAP - Zorin Help
then went here Member server in an Active Directory domain | Ubuntu.
Why would active directory need to be setup?
I am not doing this because it seems over the top just to share folder between zorin os pro and windows 11..
need help!

Hey folks, new linux user moving from Windows after 25+ years. I went with Zorin because it was touted as easy for Windows converts. I have the same issue

"'net usershare' returned error 255: [2023/05/27 08:28:33, 0] ../../lib/util/debug.c:1100(reopen_one_log)
reopen_one_log: Unable to open new log file 'test folder/log.net': No such file or directory
net usershare add: share name /mnt/seagatebud/test folder contains invalid characters (any of %<>*?|/+=;:",)"

that folder has 1 text file with the text "test file 1" in it. As you can see no special files. If something as simple as trying to share a folder accross my own network is this difficult, what are we to do? BTW, I am using Zorin Pro 16.2 fully updated and have used the following links to try and resolve the issue:

[SOLVED] Running software and opening files from NTFS drives - Linux Mint Forums.

I will say this, this problem is my biggest one and is keeping me from ditching Windows completely. I truly want to learn and if there is something else to be tried, I will gladly do so. When / IF I figure this out, I will create a detailed step by step document including screen shots for everyone.

1 Like

Agreed. This is a critical bug that cripples one of the main uses of a Linux box. This needs a documented fix now. There seems to be a clear awareness of what the problem is on Github, but no meaningful fix or documentation for we normies as yet.

UPDATE: Confirmed that this problem is caused by the version of Ubuntu samba that is bundled with the Zorin core ISO.
If someone has a clear guide on how to update those components to any version above or below the broken one, the problem will be resolved.

Its the Ubuntu samba that is the problem. The version shipping in the ISO is broken and needs a later version to fix this problem. How to do this, is beyond me!

Current version in Focal is 2:4.15.13

How did you confirm this? I am not saying your are incorrect in this; but the package in the main repository being incorrect is kind of a big deal.
That would need to be addressed and corrected.

It was a torture trial to find it, but GitHub had the answer. They documented that the samba version shipping with the ISO is the same as the one that had the error in the way it handles the sharenames. It is literally only 1 or two wrong characters, but it effectively breaks the whole thing. I can't find the version number at the moment, (no access to the machine right now) but it was 14.something. 16 and higher don't have the problem. And yes, it is a HUGE deal that the repository is wrong. I would have thought this would have come to their attention a lot quicker.

Aravisian: I'm setting up a number of Zorin Core boxes at my workplace. They will need to share folders and files on a Windows network. All these boxes are setup from scratch, completely fresh. All with the same samba issues. Tried the latest versions of Mint and Ubuntu and had no issues with sharing. They ARE using a newer version of Ubuntu samba that Zorin. Then saw the Github discussion about needing to patch that version to correct issue with the -l argument when it should be --long instead. Let me know if you need some more info.

User reports that current Samba version in Zorin OS contains a fatal flaw.

Link to download latest Samba:

Link to package dependencies:

Above I have alerted the ZorinGroup to this issue.
In the meantime, python3 may be needed creating a situation of a Tricky Install. Let's wait on that briefly until the ZorinGroup has a chance to review.

Python 3 is already included in Zorin 16, beginning with 3.8 and I believe will be or is at 3.9 now. So this shouldn't be an issue.

I expect they'll have an iso out quickly.

At least the dependencies aren't version specific!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.