[trusty] "usershare" access denied error (leads to non working nautilus samba sharing)

Bug #1261873 reported by Cliff Carson on 2013-12-17
This bug affects 68 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)

Bug Description

Installed daily build of gnome 14.04 dated 12/17 can not share directories. Getting

'net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. Access denied.

Copied a unmodified version of smb.conf from my 13.10 system, ran sudo service cups restart and now can successfully share directories.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: cups 1.7.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.12.0-7.15-generic 3.12.4
Uname: Linux 3.12.0-7-generic x86_64
ApportVersion: 2.12.7-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Dec 17 14:21:08 2013
InstallationDate: Installed on 2013-12-17 (0 days ago)
InstallationMedia: Ubuntu-GNOME 14.04 "Trusty Tahr" - Alpha amd64 (20131217)
Lpstat: device for HP_Photosmart_1210: usb://HP/Photosmart%20C4100%20series?serial=MY73EH528Q04J7&interface=1
MachineType: Si G41M-P33
Papersize: letter
PpdFiles: HP_Photosmart_1210: HP Photosmart c4100 Series, hpcups 3.13.11
 PATH=(custom, no user)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.12.0-7-generic root=UUID=ae61c7ab-c5ce-4862-985b-7b235036faee ro quiet splash vt.handoff=7
SourcePackage: cups
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/05/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V7.7
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: G41M-P33 (MS-7592)
dmi.board.vendor: MSI
dmi.board.version: 3.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MSI
dmi.chassis.version: 3.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV7.7:bd01/05/2010:svnSi:pnG41M-P33:pvr3.0:rvnMSI:rnG41M-P33(MS-7592):rvr3.0:cvnMSI:ct3:cvr3.0:
dmi.product.name: G41M-P33
dmi.product.version: 3.0
dmi.sys.vendor: Si

Cliff Carson (ccarson1) wrote :
Till Kamppeter (till-kamppeter) wrote :

First, why is this a bug in CUPS? For me this looks more like a Samba problem. smb.conf is the config file of Samba, it is also Samba which shares directories. CUPS is the printing system.

Please also attach your working smb.conf which you have taken from 13.10, so that we can compare.

Till Kamppeter (till-kamppeter) wrote :

Moving to Samba ...

affects: cups (Ubuntu) → samba (Ubuntu)
Changed in samba (Ubuntu):
status: New → Incomplete
Cliff Carson (ccarson1) wrote :

Yes, sorry about that. Had problem with cups before this and CUPS stuck in my head.

N1ck 7h0m4d4k15 (nicktux) wrote :

Why this bug was marked as incomplete ? What are the attachments you want ? Please ask from OP the files you want (if any).
I'm facing the same problem in Ubuntu 14.04 (Trusty). Exact same error. I cannot share a folder. I also tried with "system-config-samba" but nothing happened.

Changed in samba (Ubuntu):
status: Incomplete → Confirmed
N1ck 7h0m4d4k15 (nicktux) wrote :

Oh yes. This is an /etc/samba/smb.conf file mistake. I tried what @Cliff Carson suggested and it worked like it should.

Nazar Mokrynskyi (nazar-pc) wrote :

Confirm, config by Cliff Carson works fine.

By using the patched smb.conf from Unmodified 13.10 saucy system, its now fixed. Now we'll just wait to make the fix becoming released on next update.

Changed in samba (Ubuntu):
status: Confirmed → Fix Committed
rabotond (amandakanada) wrote :

Oh yes. This is an /etc/samba/smb.conf file mistake. I tried what @Cliff Carson suggested and it worked like it should.

AliNâ (alinajafi) wrote :

The 13.10 configuration file by @Cliff Carson (comment #4) works for me too. Thanks dude!

intronauta (intronauta77) wrote :

The smb.conf provided by Cliff Carson in the comment #4 solved the same problem on 14.04 too

Morbius1 (morbius1) wrote :

In the "#======================= Share Definitions =======================" section of smb.conf exists the original [homes] share from Debian which looks like this but is scattered throughout the section:

   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S

Ubuntu usually comments out this share but in this case it was incomplete. Only [homes], "comment = Home Directories", and "browseable = no" were commented out.

This leaves "read only = yes", "create mask = 0700", "directory mask = 0700" and "valid users = %S" intact and interpreted by samba as global parameters which makes a mess of things. In this particular bug report having "valid users = %S" interpreted as a global parameter induces the originally posted error message.

All of the [homes] share parameters must be commented out.

Shwan (shwan-ciyako) wrote :

Interesting in Beta1 of 14.04 I came by this bug! The solution was to comment the lines as mentioned above.

James Dupin (james.dupin) wrote :

same thing today

Still present in daily build. After making changes to smb.conf I made a local copy to ensure I can revert back if needed.

James Landrum (james-landrum1) wrote :

Since I am a complete noob and kinda freaked out when I found this page without simple step-by-step instructions, and since I did figure it out myself by googling how to edit a .conf file, I figured I'd share with other potential noobs:

-Open terminal and type "sudo gedit /etc/samba/smb.conf"
-Copy/paste text from file attachment in 4th comment https://launchpadlibrarian.net/160051499/smb.conf.good
-Thank Cliff

Takumi Yamazaki (xdddrngy2j) wrote :

Confirmed bug still present in daily build.

Paul White (paulw2u) wrote :

The bug is shown as "Fix Committed" not "Fix Released".

No need to keep confirming the bug exists as this just generates unwanted emails.

ysingh (ys-rajput) on 2014-03-24
Changed in samba (Ubuntu):
status: Fix Committed → Fix Released
Giorgio Dramis (jorged) wrote :

I upgrated Ubuntu but I have always the same situation.

Giorgio Dramis (jorged) wrote :

I have updated the system! I activated the Proposed repository! I tried to do a fresh install of samba! But the bug is still there! HELP!

Changed in samba (Ubuntu):
status: Fix Released → Triaged
importance: Undecided → High
tags: added: release-t-incoming
Sebastien Bacher (seb128) wrote :

That change basically restores some of the diff we had over Debian (I assume it was dropped by mistake since the changelog doesn't mention it being dropped for a reason)

Changed in samba (Ubuntu Trusty):
status: Triaged → In Progress
summary: - 'net usershare' returned error 255
+ [trusty] "usershare" access denied error (leads to non working nautilus
+ samba sharing)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:4.1.3+dfsg-2ubuntu5

samba (2:4.1.3+dfsg-2ubuntu5) trusty; urgency=medium

  * debian/smb.conf: comment back some of the "share definitions"
    options (including "valid users"). That was an Ubuntu diff and seems to
    have been dropped in the trusty merge. Those changes seem needed to
    get the usershare feature working (used by nautilus-share) (lp: #1261873)
 -- Sebastien Bacher <email address hidden> Tue, 01 Apr 2014 16:01:04 +0200

Changed in samba (Ubuntu Trusty):
status: In Progress → Fix Released
taj (othertaj) wrote :

I use the smb.conf that worked like a charm in 12.04 and 13.10, but I cannot get access anymore from remote (Windows) computers. It does not see the share anymore.
Message when connecting Win7 machine: The remote device or resource won't accept the connection - Detected

Nothing has worked so far. I have uninstalled and reinstalled samba packages, changed valid users in smb.conf. testparm is ok.
samba 2:4.1.6+dfsg i386 is currently running

Sorry for the rant, but I am amazed that trivial issues like this (and e.g. a file-cannot-be-read-press-enter-to-continue bug after boot) exist in an LTS version. It is frustrating and a waste of time to fix something that used to work.

Tanguy Herrmann (dolanor) wrote :

I think it is still an issue.
I can't get my shares to work.

samba 2:4.1.6+dfsg-1ubuntu2.14.04.3 installed.

I'm getting some NT_STATUS_ACCESS_DENIED with nautilus and smbclient while using a correct unix user which has the ACL set to F and is the owner with full access of the share…

Raoul Bhatia (raoul-bhatia) wrote :

As mentioned in comment 12, there are some configuration options regarding [homes] commented out.

If you put these back in, (i.e. comment [home], ... back in), it will work with the Ubuntu provided packages.
At least, I can confirm this to be working with samba "2:4.1.6+dfsg-1ubuntu2.14.04.3".


ped5 (pedwards-umich) wrote :

Ran an update from a 12.10 update, and got the same error, and fell on this thread.

I've added chuck's smb.conf.good, and updated my current shares. All the original [homes] shared parameters are commented out.

Running samba 2:4.1.6+dfsg-1ubuntu2.14.04.3
on 14.04 LTS

All of my shares are visible through windows machines and XBMC, however still getting NT_STATUS_ACCESS_DENIED with smbstatus.

My shares made generic are as such:
   comment = Backup Drive 2TB
   path = /media/disk2
   browseable = Yes
   read only = no

   comment = Media Directory
   path = /media
   browseable = Yes
   read only = no

   comment = XMBC access to movies
   path = /home/user/Movies
   public = yes
   guest ok = yes
   read only = no

   comment = XMBC access to TV
   path = /home/user/TV
   public = yes
   guest ok = yes
   read only = no

Yes, I know share1 and 2 point the same locations, just share 1 I typically map to the windows machines whereas 2 is if I need access to USB drives.

So although it's not causing issues for what I need done persay, it's still a bit concerning that it's apparently not clean. Is there something to do with chmod or UID access that I've overlooked?

Not urgent as it functions, just would like it to run a bit more clean before there are other issues introduced that I'm simply not noticing yet.

Appreciate any insights,

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

Other bug subscribers