Ошибка 255 при запуске net usershare ubuntu

  • Печать

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

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

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  Все   Вверх

I am getting the following error while running net usershare command.

‘net usershare’ 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.

How to fix this?
Thanks,
:)

MeSo2's user avatar

MeSo2

3991 gold badge8 silver badges23 bronze badges

asked Feb 4, 2013 at 11:15

Ashis Sanpui's user avatar

The directory /var/lib/samba/usershares is set up so only root or members of the sambashare group can read or write to it.

drwxrwx--T  2 root sambashare  4096 Mar 25  2012 usershares

That you can’t access it (try it by cding to it) suggests to me that you’re not in the sambashare group. You can test this with id $USER and assuming usershares is not in the output, you can fix all this just by running:

sudo usermod -a -G sambashare $USER

If you still get error 255 after adding the particular user to the group you might need to reboot.

user212082's user avatar

answered Feb 4, 2013 at 11:23

Oli's user avatar

OliOli

288k117 gold badges677 silver badges832 bronze badges

2

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.

answered Nov 9, 2020 at 15:59

PabloRQ's user avatar

PabloRQPabloRQ

1391 silver badge4 bronze badges

⬅ Go to ubuntu-mate.org
About
Features
Blog
Download
Support
Get Involved
Emporium
Funding

0

I just did a update to my system, one of which was Samba for UBUNTU 10.04 and now it will not allow me to get privilages when I use Nautilus.

Any ideas on how I can get this back?

  • samba

Improve this question

asked Mar 18, 2011 at 6:59

Ubuntu User's user avatar

Ubuntu UserUbuntu User

712 gold badges3 silver badges11 bronze badges

Add a comment
 | 

1 Answer

Sorted by:

Reset to default

0

Is a permission problem described here https://answers.launchpad.net/ubuntu/+source/nautilus/+question/31818

Quick fix:

chown root:sambashare /var/lib/samba/usershares

Regards

Improve this answer

answered Mar 18, 2011 at 13:34

Sacx's user avatar

SacxSacx

2,57116 silver badges13 bronze badges

Add a comment
 | 

Your Answer

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Post as a guest

Name

Email

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you’re looking for? Browse other questions tagged

  • samba

or ask your own question.

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.Xcompartir

And ready..

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

Понравилась статья? Поделить с друзьями:
  • Ошибка 255 при запуске net user share
  • Ошибка 255 доступно питание от сети
  • Ошибка 255 газовое оборудование стаг
  • Ошибка 255 в овен клауд
  • Ошибка 255 в игре ведьмак 2