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

Bug #211966 reported by Baptiste Mille-Mathias
66
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Apache2 Web Server
Invalid
Undecided
Unassigned
OEM Priority Project
New
Undecided
Unassigned
nautilus-share (Ubuntu)
Fix Released
Low
Anthony LPG
samba (Ubuntu)
Won't Fix
Undecided
Unassigned

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

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

Okay it seems the command net comes from samba

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 211966] [NEW] nautilus-share report a warning about missing /var/lib/samba/usershares
  • 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 http://www.ubuntu.com

Changed in samba:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Slava (slava-slavix) wrote :

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

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

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

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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..

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

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

Revision history for this message
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!

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

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.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

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 ?

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

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

Revision history for this message
Mathias Gug (mathiaz) wrote :

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

Changed in samba:
status: New → Incomplete
Revision history for this message
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)
Changed in samba:
status: Incomplete → Won't Fix
Revision history for this message
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).
Relogin.
And needed a "sudo smbpasswd -a username" to log into protected folders.

Revision history for this message
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.

Revision history for this message
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

add
usershare owner only = False

save smb.conf

it works like a charm

Revision history for this message
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)
Revision history for this message
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
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
 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

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

[print$]
 comment = Printer Drivers
 path = /var/lib/samba/printers
virtual@virtualpc:~$

Changed in apache2:
status: New → In Progress
Chuck Short (zulcss)
Changed in apache2:
status: In Progress → Invalid
Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

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

Revision history for this message
Rey Leonard Amorato (rl.amorato) wrote :

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

Revision history for this 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

nautilus-share:
  Installiert: 0.7.3-1ubuntu3
  Installationskandidat: 0.7.3-1ubuntu3
  Versionstabelle:
 *** 0.7.3-1ubuntu3 0
        500 http://de.archive.ubuntu.com/ubuntu/ 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.

Revision history for this message
John Drinkwater (johndrinkwater) wrote :

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?

Revision history for this message
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
(https://bugs.launchpad.net/ubuntu/+source/nautilus-share/+bug/225859/comments/3).

Revision history for this message
Roger Davis (rogerdavis-d) wrote :

Also happens in 18.04 !!!

Revision history for this message
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
Revision history for this message
Bib (bybeu) wrote :

Still affected in 16.04.6 upgraded from Trusty : the log in this machine shows

Mar 28 17:41:43 nux gnome-session[25837]: Nautilus-Share-Message: Called "net usershare info" but it failed: « net usershare » returned error 255 : mkdir failed on directory /var/run/samba/msg.lock: Permission denied
Mar 28 17:41:43 nux gnome-session[25837]: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error None file or directory of this kind
Mar 28 17:41:43 nux gnome-session[25837]: Please ask your system administrator to enable user sharing.

even after I created /var/lib/samba/usershares and touch /var/run/samba/msg.lock (*):

~ ls -l /var/lib/samba/
total 8
drwxr-xr-x 3 root root 4096 march 4 2017 private
drwxr-xr-x 2 root root 4096 march 28 17:42 usershares

# members sambashare
me

$ ls -l /var/run/samba/msg.lock
-rw-r--r-- 1 root root 0 mars 28 18:55 /var/run/samba/msg.lock

(*)Maybe I should have mkdir msg.lock ?
Yes I should:
$ net usershare info --long
directory /var/run/samba/msg.lock isn't a directory

# rm /var/run/samba/msg.lock
# mkdir /var/run/samba/msg.lock

Wait and see

Here only nautilus-share is installed (I was prompted to install it by Files one day when I wanted to share a folder - Samba not installed : not prompted=no need)

Revision history for this message
Bib (bybeu) wrote :

We have the same behaviour @Linux Mint : https://bugs.launchpad.net/linuxmint/+bug/1608061
Maybe I had nemo in 14.04 before upgrade to 16.04. Also as I said I have not samba installed but dependencies like samba-common[-bin], samba-libs etc.
I'll remove all this even nautilus-share as I don't need it any more : I use sftp over ssh bookmarks instead

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.