nautilus-share report a warning about missing /var/lib/samba/usershares

Bug #211966 reported by Baptiste Mille-Mathias on 2008-04-04
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Apache2 Web Server
OEM Priority Project
nautilus-share (Ubuntu)
Anthony LPG
samba (Ubuntu)

Bug Description

Binary package hint: nautilus-share

if you start nautilus from console you can see this error message:

Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Aucun fichier ou dossier de ce type
Please ask your system administrator to enable user sharing.

I assume it needs to create /var/lib/samba/usershares in the package

Okay it seems the command net comes from samba

  • unnamed Edit (189 bytes, application/pgp-signature; name="signature.asc")

On Fri, Apr 04, 2008 at 10:08:53PM -0000, Launchpad Bug Tracker wrote:
> Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Aucun fichier ou dossier de ce type
> Please ask your system administrator to enable user sharing.

/var/lib/samba/usershares is created during the postinst of the samba
package while the net command is part of the samba-common package.

However it doesn't stop nautilus from running properly.

  status triaged
  importance low

Mathias Gug
Ubuntu Developer

Changed in samba:
importance: Undecided → Low
status: New → Triaged
Slava (slava-slavix) wrote :

is there a workaround this problem? i need to enable file sharing. thank you

Patrice Vetsel (vetsel-patrice) wrote :

@Slava :
As said by Mathias Gug : "However it doesn't stop nautilus from running properly."

Václav Šmilauer (eudoxos) wrote :

The problem here is that nautilus may ask you to install samba. The installation will add you to the sambashare group (which alone has the permission to use /var/lib/samba/usershares), BUT the change is not effective until you log off and on again (run id in terminal to check)!!!

When user is asked to confirm samba installation, he/she should be informed about this OR the mount should be run with sg, if samba has just been installed.

Václav Šmilauer (eudoxos) wrote :

reassigning to nautilus-share, since it should handle whether user really is in sambashare group (see previous comment).

Changed in samba:
status: Triaged → Confirmed
frizzle21 (frederik-nnaji) wrote :

i'm running a clean Beta install of Hardy... kept going with the updates... Samba behaves in the above described way here, too.
i logged off and back on and it worked immediately..

For me the error is resilient,
I have each time; it's not really a problem, but I would prefer to not appear

muhalifsirin (alperense) wrote :

I logged out and then in, also I manually added my self to the group sambashare, and still I can not share a single file in hardy, final release. I get the same message all over again.

Please help!

I cannot access to file shared on the SMB network with Hardy. Nautilus see the computers but, when I open them, Nautilus displays them empty. Works fine with Gutsy, even on a live CD. I comment here because it might be related. If this is the case, the status of this bug is quite important because it breaks SMB share for a lot of people.

I must add that it seems a pretty critical issue to me. (at least here, I must stop a few Ubuntu migration until this problem is solved.) Anyone to recommend a Gtk samba browser so I can still browse the shares without rebooting Windows ?

Forget my previous comment. The real bug is bug #206439 which is not related with this one.

Mathias Gug (mathiaz) wrote :

Could you post the permissions of /var/lib/samba/usershares ?

Changed in samba:
status: New → Incomplete
bastafidli (ubuntu-bastafidli) wrote :

I can verify that this bug still exists in the final release. The directory didn't exist. I have solved it by doing this

mkdir /var/lib/samba/usershares
chmod 777 /var/lib/samba/usershares

Chuck Short (zulcss) on 2008-05-05
Changed in samba:
status: Incomplete → Won't Fix
Lolcat (bigchimp87) wrote :

Had that problem too.
The installation will NOT add you to the sambashare group .
At least not when samba is picked in the installation options.
What worked:
Added me to the sambashare group (did it with the user/groups gui, users, allow local share).
And needed a "sudo smbpasswd -a username" to log into protected folders.

Tomas Gustavsson (tomplast) wrote :

Hmm, wouldn't a groupadd -a -G sambashare $USER do the trick? Maybe it could be put into the Makefile? Or perhaps not??? I don't know how but this seems fairly easy to fix.

Anis CHEBBI (chebbi-anis) wrote :

you can solve this by adding a line in smb.conf

sudo gedit /etc/samba/smb.conf

in the [Global] section

usershare owner only = False

save smb.conf

it works like a charm

Chow Loong Jin (hyperair) wrote :

As per Václav Šmilauer's post, all that's required after the samba installation is a restart of the session, i.e. logging out and logging back in. The current nautilus-share prompts the user after the auto-installation of samba (and libpam-smbpass) to restart the session. Hence, I'm marking this as fix released.

Changed in nautilus-share (Ubuntu):
status: Confirmed → Fix Released
Changed in nautilus-share (Ubuntu):
assignee: nobody → Anthony LPG (cubausatony)
Anthony LPG (cubausatony) wrote :

virtual@virtualpc:~$ sudo nautilus
seahorse nautilus module initialized
Initializing nautilus-share extension

** (nautilus:10359): WARNING **: Unable to add monitor: Operation not supported
seahorse nautilus module shutdown
virtual@virtualpc:~$ sudo gedit /etc/samba/smb.conf
virtual@virtualpc:~$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
ERROR: lock directory /var/run/samba does not exist
ERROR: pid directory /var/run/samba does not exist
Press enter to see a dump of your service definitions

 server string = %h server (Samba, Ubuntu)
 map to guest = Bad User
 obey pam restrictions = Yes
 passdb backend = tdbsam
 pam password change = Yes
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
 unix password sync = Yes
 syslog = 0
 log file = /var/log/samba/log.%m
 max log size = 1000
 dns proxy = No
 usershare allow guests = Yes
 usershare owner only = No
 panic action = /usr/share/samba/panic-action %d
 invalid users = root

 comment = All Printers
 path = /var/spool/samba
 create mask = 0700
 printable = Yes
 browseable = No

 comment = Printer Drivers
 path = /var/lib/samba/printers

Changed in apache2:
status: New → In Progress
Chuck Short (zulcss) on 2010-04-23
Changed in apache2:
status: In Progress → Invalid

THis warning is still present on Ubuntu 13.04, I don't know if we should report a new bug (or even if this should be a bug).

Confirmed on ubuntu 13.04. Sometimes a notification pops up out of no where with this error message.

Dennis Baudys (thecondordb) wrote :

condor@herkules:~$ uname -a

Linux herkules 3.8.0-31-generic # 46-Ubuntu SMP Tue Sep 10 20:03:44 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

condor@herkules:~$ sudo apt-cache policy nautilus-share

  Installiert: 0.7.3-1ubuntu3
  Installationskandidat: 0.7.3-1ubuntu3
 *** 0.7.3-1ubuntu3 0
        500 raring/main amd64 Packages
        100 /var/lib/dpkg/status

condor@herkules:~$ nautilus

(nautilus:2880): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed
(nautilus:2880): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed
Nautilus-Share-Message: Called "net usershare info" but it failed: »net usershare« gab den Fehler 255 zurück: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Datei oder Verzeichnis nicht gefunden
Please ask your system administrator to enable user sharing.

Just seen this message in syslog and I wonder why Fix Released is marked on nautilus-share if 8 years later this is still occuring?

Sebastian Meyer (wastl) wrote :

I am running Ubuntu 16.04.1 and can confirm the appearance of this error message in the terminal when nautilus is launched. The error sometimes also pops up in a notification window, as observed in Comment #21.

Since I do not use the nautilus-share extension, I simply removed the corresponding package to get rid of this error - as suggested in a comment on the duplicate bug report

Roger Davis (rogerdavis-d) wrote :

Also happens in 18.04 !!!

Roger Davis (rogerdavis-d) wrote :

Initializing nautilus-dropbox 2.10.0
Nautilus-Share-Message: 20:23:01.714: Called "net usershare info" but it failed: 'net usershare' returned error 255: mkdir failed on directory /var/run/samba/msg.lock: Permission denied
net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

tags: added: oem-priority
tags: added: originate-from-1856685
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Bug attachments