Net usershare вернул ошибку 255

I had a similar error on Ubuntu 20.04 and this was the way to solve it:

Remove all samba related files and configuration files

sudo apt purge python3-samba samba-common samba-common-bin samba-dsdb-modules samba samba-vfs-modules smbclient

Optionally you can remove the packages and maintain the configuration files, but this could left wrong files in the middle. It’s better to do a backup of your configuration files. Anyway, if you want to try it, use remove instead of purge.

Reboot

Not sure if it’s completely necessary, but I do it this way.

Share files

Open Nautilus and share a file or directory. A warning is showed indicating the sharing service is not installed and allowing you to click to install it. Click, install and you’re done!

The nautilus-share package creates the /var/lib/samba/usershares/ directory with the right permissions and added your user to sambashare group, and it’s ready to be used by other users too.

  • Печать

Страницы: [1] 2  Все   Вниз

Тема: Ошибка 255 при запуске ‘net usershare’  (Прочитано 38164 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
lcnet

Добрый день!

После обновления с Ubunta 9.04 до 9.10 при попытке расшарить папку периодически вылетает эта ошибка:

«Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Memory allocation error»

Пробовал рестатить самбу «sudo /etc/init.d/samba restart»
Пробовал расшаривать через консоль с помощью «net usershare»

Самое интересное что ошибка не постоянная, появляется после перезагрузки системы и исчезает после первой же перезагрузки ситемы, а бывает что раз по 10 рестартить приходится.

Как это лечить?

З.Ы. Сильно не ругаться я новичок в Линуксоводстве)


Оффлайн
kosh59

лечится оно добавлением в файл /etc/samba/smb.conf
строчки

usershare owner only = falseну и конечно перезапуском самбы

sudo /etc/init.d/samba restart


Оффлайн
nocturna

Та-же проблема.

Ошибка 255 при запуске 'net usershare': net usershare add: cannot convert name "Everyone" to a SID. Memory allocation error.
Добавление usershare owner only = false не помогло…


Оффлайн
S.Dedal

У меня похожая проблема. Поставил Ubuntu 9.10 второй системой после Windows 7, при попытке расшарить папку, находящуюся на винте с файловой системой ntfs получаю пресловутую ошибку 255. Прописал строчку usershare owner only = false в /etc/samba/smb.conf следующим образом:

Но эта ошибка все равно появляется, перезапуск самбы и перезагрузка не помогли.
Возможно что-то сделал не так или прописал не туда, т.к. Ubuntu поставил недавно и в ней я нубас полнейший.


Оффлайн
lcnet

kosh59, Неее тут другое… такое ощущение что все ошибки с ‘net usershare’ именуются Ошибка 255…

Вот пример:
«Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot share path /media/disk as we are restricted to only sharing directories we own. Ask the administrator to add the line «usershare owner only = False» to the [global] section of the smb.conf to allow this«
— Эта ошибка значит вы пытаетесь сделать общедоступным диск или папку, владельцем которой ваша учётная запись не является.

Как ты и горишь надо в etc/samba/smb.conf и в секцию [global] в подраздел Misc дописать строчку:

usershare owner only = False.

Это разрешит нам как пользователю открывать общий доступ к чужим объектам. Так, диски находятся в ведении суперпользователя.

 Опять таки ошибка с номером 255
«Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Memory allocation error«
— Чем она лечится я так и не понял, или мои махинации помогли то-ли этот глюк прошел сам через пару обновлений…

Я делал так.
1) Примонтировал диски таким нехитрым способом
sudo gedit /etc/mtab
скопировал нужное и в вставил в
sudo gedit /etc/fstab
заменив fuseblk на ntfs-3g
1.2) строка «usershare owner only = False«. у меня уже была прописана… если у Вас нет, вставьте на всяк пожарный
2) Поставил самбу «Sudo apt-get install samba«,
3) Расшарил папки через ГУИ Samb’ы «Система/Администрирование/Samba» назначив там нужные права доступа.

« Последнее редактирование: 27 Января 2010, 20:44:22 от lcnet »


Оффлайн
netsloff

попробуйте так sudo /etc/init.d/samba restart Если будет так (ок) (fail) то сделайте так sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart мне помогло…


Оффлайн
stepnoy

мне это не помогло

попробуйте так sudo /etc/init.d/samba restart Если будет так (ок) (fail) то сделайте так sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart мне помогло…

вот такая постоянно ошибка

кто может подсказать в чем тут проблема?


Оффлайн
GrafTrahula

можно попробовать запустить sudo nautilus и через него повторить расшаривание.мне помогло


Оффлайн
simulyant

У меня при расшаривании папки через nautilus возникает эта ошибка «Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter»

— добавление usershare owner only = false в /etc/samba/smb.conf — не помогло
— Переустановка samba-common-bin — sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart — не помогло
— Запуск sudo nautilus не помог

Что делать?

Ubuntu 10.04 Netbook Edition


Оффлайн
Kiberman

У меня при расшаривании папки через nautilus возникает эта ошибка «Ошибка 255 при запуске ‘net usershare’: net usershare add: cannot convert name «Everyone» to a SID. Invalid parameter»

— добавление usershare owner only = false в /etc/samba/smb.conf — не помогло
— Переустановка samba-common-bin — sudo apt-get install —reinstall samba-common-bin а потом так sudo /etc/init.d/samba restart — не помогло
— Запуск sudo nautilus не помог

Что делать?


тоже такая же ошибка,решения пока не нашёл может кто из постояльцев ответит

« Последнее редактирование: 09 Марта 2011, 15:49:08 от Kiberman »


Оффлайн
gregory5

Расшаривай через конфиг, а не наутилус, и да судо наутилус запуститься без поддержки сети из за кривизны в шине, запускать нужно sudo dbus-launch nautilus, но не расшаривай наутилусом, криво оно работает


Оффлайн
0konstantin0

как я понял такое бывает если дополнительно установить сервер самба из репозитория помимо стандартного….


Оффлайн
IAmABanana

Была такая же проблема с расшариванием собственых папок через роутер. Решилось всё очень просто: идём Система>Администрирование>опубликованные папки и добавляем всё что нужно.

KXStudio 14.04 дуалбут с Win7
Lenovo Thinkpad X230


Оффлайн
ps1x0

Здравствуйте, уважаемые. Была похожая проблема: не мог расшарить папку с полным доступом на ntfs разделе.
Победил с помощью добавления строчки usershare owner only = false в секцию [global] /etc/samba/smb.conf
Потом возникла проблема с предоставлением гостевого доступа к расшаренной папке. Не знаю что тут сыграло определяющую роль, но во-первых убрал sticky-бит c usershares

sudo chmod -t /var/lib/samba/usershares
во-вторых примонтировал раздел с ntfs c правами drwxrwxrwx, путем изменения umask=007 на umask=000. В итоге строчка в fstab с ntfs разделом выглядела следующим образом:

UUID=C53D4B0FAEB1E5A1 /media/data     ntfs    defaults,umask=000,gid=46 0       0
Решил на всякий случай написать, может кому-нибудь пригодится. Ubuntu 10.04 LTS

« Последнее редактирование: 18 Ноября 2011, 10:56:02 от ps1x0 »

Если отдавать ужин врагу, можно приобрести друга (с)


Оффлайн
denisyan

проблема решилась так. Началось это после установки сервера и изменении прав вна каталог VAR. Я вернул права на место и через рута (sudo nautilus) назначил общий доступ. Папка появилась в сети после перезагрузки


  • Печать

Страницы: [1] 2  Все   Вверх

First of all, what is Samba error 255? Well, it is the error that we get when in Ubuntu (for example), we try to share a folder and we cannot because it tells us:

The "network share" returned error 255: net usershare: cannot open usershare directory / var / lib / samba / usershares. Error Permission Denied You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.

This happened to me when I tried to create a shared folder on one of my users’ PCs, so that I could comfortably exchange files with a Windows XP virtual machine running on Virtualbox.

In the case of Ubuntu the solution is simple, because I solved everything by executing in the terminal:

sudo chmod 777 /var/lib/samba/usershares

But this may not be the solution for others. For example, in the case of Debian it can be easily solved also by adding our user to the sambashare group.

# addgroup usuario sambashare

They just told me by MP that another possible solution is adding to the file /etc/samba/smb.conf the parameter: users share owner only = False

But let’s say we want something more. In this case we do not want it to ask us for a username and password to access the shared folder. Well, for this, what we do is create a folder in / media:

# mkdir /media/compartir
# chmod -R 777

And then we add to the end of the file /etc/samba/smb.conf:

[documents] comment = Shared documents path = / media / share public = yes writable = yes

And well, in some cases we have to restart Samba:

# /etc/init.d/samba restart

Now, from the virtual machine I just have to put in Windows Explorer:

\\192.168.X.X\compartir

And ready..

The content of the article adheres to our principles of editorial ethics. To report an error click here.

Want to share a folder over local network and allow access with create and delete files permission? Here’s the step by step picture guide shows how to do the trick in Ubuntu (Updated for Ubuntu 23.04 Lunar Lobster)

It’s quite easy to share your files over LAN or even outside home network either via a temporary http / ftp server, or third party file transfer tool (such as Dukto).

If you however need to setup a share folder for long time use, then samba file and print service can be a good choice.

In previous Ubuntu 22.04 and earlier, there’s a ‘Local Network Share‘ option when you right-clicking on a folder. With it, user can easily install and setup a shared folder via a few mouse clicks.

The option is no longer available in Ubuntu since 22.10. However, it’s still easy to setup network share via an extension for Nautilus (the default file manager).

  1. First, press Ctrl+Alt+T key combination on keyboard to open a terminal window.
  2. When terminal opens, paste the command below and hit run to install the nautilus-share package, which install the samba service and setup file browser integration.
    sudo apt install nautilus-share

After installation, also run command nautilus -q to quit Nautilus to apply the extension.

2. Start sharing a folder

Now, right-click on any folder that you want to share over local network. There should be a “Sharing Options” option in pop-up menu.

Just click on this option will open the dialog, which is just the similar one in the previous Ubuntu releases. Then, do:

  1. Enable the checkbox for ‘Share this folder’.
  2. Set the folder name to whatever that you want, or just leave it with default.
  3. Enable write permission for choice (create and delete files).
  4. Enable guest access so anyone can access without authentication, or leave it disabled so user need to type username & password when trying to open this folder.

Once you clicked “Create Share” button, it will ask to confirm in next pop-up dialog for adding create and delete files permission. Just click ‘Add Permission Automatically’ to confirm.

Fix “Error 255” permission denied error!

When click sharing a folder in Nautilus, it may output an error says:

‘net usershare’ return error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied.

To fix the issue, just add your current user into sambashare group! And, this can be done by opening terminal (Ctrl+Alt+T) and run command:

sudo gpasswd --add $USER sambashare

Then, restart computer to apply changes.

Finally, re-do the previous step to create a share folder. When done, your folder icon will change with a little symbol in up-right.

Folder now being shared

3. Setup a password for authentication

If you didn’t enable ‘Guest access’, then you also need to set a password for access.

  1. First, press Ctrl+Alt+T on keyboard to open terminal.
  2. Then, run command to set a smb password:
    sudo smbpasswd -a $USER
  3. Finally, restart samba service via sudo systemctl restart smbd command.

Finally, you can access this shared folder remotely via the username for current login user in Ubuntu system, but with another password you just set specially for network share.

  • Account: user-name for loggin in the Ubuntu system (run whoami to tell).
  • Password: the password you just set.

Firstly, you need to get either the hostname of local IP address for the Ubuntu machine. To do so, either go to Wifi/Network Settings, or run command in terminal:

  • To get hostname, run:
    hostname
  • To get the IP address, run:
    ip address

To access the shared folder in different system:
replace host_name_here with the hostname, and replace ip_here with the IP address. They are hirsute and 192.168.0.108 in the previous picture.

  • For Windows, go to “Start Menu -> Run” (or press Windows logo key + R) and then type either \\host_name_here or \\ip_here and hit Enter.
  • For Linux, it depends on your system. For Gnome Desktop, open file manager and go to “Other Locations”, under bottom “Connect to Server” box type smb://host_name_here or smb://ip_here and hit Enter.
  • For Mac OS, press “command + K” on keyboard to open Connect to Server dialog, type in smb://host_name_here or smb://ip_here and hit Enter.

This document (7018701) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 Service Pack 4 (SLES 11 SP4)

Situation

Upon right-clicking a folder in Gnome’s Nautilus file manager, choosing «Sharing Options,» selecting the «Share this folder» box and clicking the «Create Share» button in the open dialog, the following error is returned:

‘net usershare’ returned error 255:  net usershare add: cannot convert name «Everyone» to a SID. Access denied.

Resolution

Since samba-client version 3.6.3-76.1, a new global option is required in smb.conf.

hostname:~ # vi /etc/samba/smb.conf

Add this option under the [global] section:

client ipc signing = auto

After the change is written, restart the samba service:

hostname:~ # rcsmb restart

Cause

Several CVEs were addressed for this samba-client package with the update to version 3.6.3-76.1.  As a result of these changes, this new client ipc signing configuration option is required when creating usershares through Nautilus.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented «AS IS» WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7018701
  • Creation Date:
    09-Mar-2017
  • Modified Date:28-Sep-2022
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

Понравилась статья? Поделить с друзьями:
  • Neva lux 7218 ошибка 99
  • Net user администратор active yes системная ошибка 5
  • Netsh exe ошибка
  • Net use системная ошибка 1222
  • Neva lux 7023 ошибка е2