Fix net rpc share allowedusers to work with 2008r2

Bug #1061244 reported by Olly Betts on 2012-10-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
James Page
Paul Wise (Debian)

Bug Description


The RAP NetShareEnum command was removed in Windows 2008r2, so "net rpc share allowedusers" no longer works.

[Test Case]

Install a Windows 2008r2 or later server and setup a domain and export some shares. Install Ubuntu precise on a machine on the same network and join it to the domain. Then run this command on a machine running Ubuntu precise:

$ net usersidlist | net rpc share allowedusers -U Administrator -S <ipaddr>

Where <ipaddr> is the IP address of the Windows 2008r2 server.

Without the patch, this gives:

Error returning browse list: NT_STATUS_NOT_SUPPORTED

With the patch it shows the shares and which users can view them.

[Regression Potential]

This has been running in production with various versions of samba since at least July 2011 and it seems to work well with both 2008r2 and older versions of Windows.

Samba upstream have applied the patch to the 3.6 branch, indicating they believe it's a change suitable for a stable release series:

[Other Info]


The attachment "debdiff for patched precise package" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
James Page (james-page) on 2012-10-05
Changed in samba (Ubuntu):
assignee: nobody → James Page (james-page)
James Page (james-page) wrote :

Thanks for the fix Olly

Uploaded to quantal; pending release team approval.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.6.6-3ubuntu5

samba (2:3.6.6-3ubuntu5) quantal; urgency=low

  * Change "net share allowedusers" to use RPC call that works with
    Microsoft Windows 2008 r2 (LP: #1061244).
 -- Olly Betts <email address hidden> Fri, 05 Oct 2012 12:52:33 +0100

Changed in samba (Ubuntu):
status: New → Fix Released
Olly Betts (ojwb) wrote :

Thanks for apply the patch.

Can I request this fix get backported to the precise package too? If there's anything I can do to help make that happen, let me know.

I've been running the final version of the patch in production on precise since June 2012 (and earlier versions of the patch since at least July 2011). Samba upstream have applied the patch to the 3.6 branch, indicating they believe it's a change suitable for a stable release series.

Olly Betts (ojwb) on 2012-10-07
description: updated
Dimitri John Ledkov (xnox) wrote :

To get this SRUed into Precise, follow the procedure from
- adjust the bug description as per template on that page
- write an easy to follow test-case (i understand that it may require microsoft server)
- prepare debdiff with correct version number for precise-proposed bumping the dot revision
- resubscribe sponsors team

I am unsubscring sponsors team for now.

Changed in samba (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Low
Changed in samba (Ubuntu):
importance: Undecided → Low
description: updated
Paul Wise (Debian) (pabs) wrote :
Changed in samba (Ubuntu Precise):
assignee: nobody → Paul Wise (Debian) (pabs)
Olly Betts (ojwb) on 2012-12-19
description: updated
Marc Deslauriers (mdeslaur) wrote :

Debdiff looks good. ACK. Uploaded to precise-proposed.


Changed in samba (Ubuntu Precise):
status: Triaged → Fix Committed
Sebastien Bacher (seb128) wrote :

(Don't worry if you receive a rejection email, I rejected that upload to do a new one including a second fix:

Hello Olly, or anyone else affected,

Accepted samba into precise-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

tags: added: verification-needed
Olly Betts (ojwb) wrote :

Thanks Dave.

I've tested the 2:3.6.3-2ubuntu2.4 package from proposed against a 2008r2 server using the test in the bug description and it works.

Miklos Juhasz (mjuhasz) on 2013-03-13
tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.6.3-2ubuntu2.4

samba (2:3.6.3-2ubuntu2.4) precise; urgency=low

  [ Olly Betts ]
  * Change "net share allowedusers" to use RPC call that works with
    Microsoft Windows 2008 r2. (LP: #1061244)

  [ Louis Bouchard ]
  * Fix issue with Windows XP / 7 (LP: #967410) where a USB
    connected printer shared on Ubuntu cannot be added to Windows
    using the "Find a printer in the directory" functionalty.

  [ Adam Conrad ]
  * Cherrypick patch from upstream to resolve a SIGABRT when passing
    setgroups a -1 gid, fixing samba with 3.5 kernels (LP: #1016895)
 -- Adam Conrad <email address hidden> Tue, 19 Feb 2013 22:22:12 -0700

Changed in samba (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers