nss-winbind is returing -1 for supplemental groups

Bug #1315565 reported by Jason Gunthorpe
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
samba
Unknown
Unknown
samba (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is a regression in trusty.

Consider:

$wbinfo -r jgg
1000
-1
10009
10011
10004
10003
-1
1002
-1

Results in:

$ getent initgroups jgg
jgg 4 24 27 30 46 108 124 1000 10009 10011 10004 10003 1002
$ id jgg
uid=2009(jgg) gid=1000(orc) groups=1000(orc),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare),4294967295,10009(vpn_users),10011(xweb_users),10004(accounting),10003(domain_users),4294967295,1002(wsudoers),4294967295

Those 4294967295 values should not be in the group list.

The underlying issue is that some of the AD groups the user is a part of are not UNIX groups, they are just general AD groups:

$ ldapsearch uid=jgg memberOf
dn: CN=Jason Gunthorpe,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=XWEB Users,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=VPN Users,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=accounting,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=wsudoers,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=Boards website editors,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=Parts website editors,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=adm,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=Domain Users,CN=Users,DC=ads,DC=orcorp,DC=ca
memberOf: CN=Print Operators,CN=Builtin,DC=ads,DC=orcorp,DC=ca

For instance, 'Print Operators' is not a UNIX group, it doesn't have the RFC2307 schema elements.

# Print Operators, Builtin, ads.orcorp.ca
dn: CN=Print Operators,CN=Builtin,DC=ads,DC=orcorp,DC=ca
objectClass: top
objectClass: group
cn: Print Operators
description: Members can administer domain printers
member: CN=Jason Gunthorpe,CN=Users,DC=ads,DC=orcorp,DC=ca
member: CN=Ian Crowe,CN=Users,DC=ads,DC=orcorp,DC=ca
distinguishedName: CN=Print Operators,CN=Builtin,DC=ads,DC=orcorp,DC=ca
instanceType: 4
whenCreated: 20080729165935.0Z
whenChanged: 20080808163035.0Z
uSNCreated: 8209
uSNChanged: 30817
name: Print Operators
objectGUID:: SBkgyF4upEG4GO6bRhj17g==
objectSid:: AQIAAAAAAAUgAAAAJgIAAA==
adminCount: 1
sAMAccountName: Print Operators
sAMAccountType: 536870912
systemFlags: -1946157056
groupType: -2147483643
objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=ads,DC=orcorp,DC=ca
isCriticalSystemObject: TRUE

# wsudoers, Users, ads.orcorp.ca
dn: CN=wsudoers,CN=Users,DC=ads,DC=orcorp,DC=ca
objectClass: top
objectClass: group
cn: wsudoers
description: Workstation Sudoers
member: CN=Rolf Manderscheid,CN=Users,DC=ads,DC=orcorp,DC=ca
member: CN=Jason Gunthorpe,CN=Users,DC=ads,DC=orcorp,DC=ca
member: CN=Ian Crowe,CN=Users,DC=ads,DC=orcorp,DC=ca
distinguishedName: CN=wsudoers,CN=Users,DC=ads,DC=orcorp,DC=ca
instanceType: 4
whenCreated: 20080808044201.0Z
whenChanged: 20111130193544.0Z
uSNCreated: 30255
info: Members can use sudo on the workstations
uSNChanged: 2007454
name: wsudoers
objectGUID:: oYEd5AZTyESv6SHZoxBGeQ==
objectSid:: AQUAAAAAAAUVAAAAmm48yDCxnAEu012CfgQAAA==
sAMAccountName: wsudoers
sAMAccountType: 536870912
managedBy: CN=Jason Gunthorpe,CN=Users,DC=ads,DC=orcorp,DC=ca
groupType: -2147483644
objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=ads,DC=orcorp,DC=ca
msSFU30Name: wsudoers
msSFU30NisDomain: ads
gidNumber: 1002

Tags: patch
Revision history for this message
Jason Gunthorpe (jgunthorpe) wrote :

Turns out this is not just a cosmetic problem, having -1 in a supplementary group list completely breaks the NFS sever as well, in a very hard to find way.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in samba (Ubuntu):
status: New → Confirmed
Revision history for this message
roelof van der kleij (r-g-van-der-kleij) wrote :

Same thing here. All groups with an empty gidnumber show up, which did not happen with samba3.

Revision history for this message
roelof van der kleij (r-g-van-der-kleij) wrote :

I iupgraded to winbind 4.3.0 using ppa:bnd-acc/samba43 and the problem was fixed. It seems this bug was fixed upstream. Any chance having the Trusty package fixed / updated?

Revision history for this message
roelof van der kleij (r-g-van-der-kleij) wrote :
Changed in samba (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
roelof van der kleij (r-g-van-der-kleij) wrote :

I accidentally changed the status of this bug to "fix release" (strange I am allowed to do that??) and am unable to change it back to confirmed.

I am now off to try to contact someone to rectify my mistake.

Revision history for this message
roelof van der kleij (r-g-van-der-kleij) wrote :

New question #281020 on Launchpad itself:
https://answers.launchpad.net/launchpad/+question/281020

I accidentally changed the status of bug 1315565 from "confirmed" to "bug released". Since I am not the original submitter I cannot change it back.

How do I fix this?

Colin Watson (cjwatson)
Changed in samba (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
roelof van der kleij (r-g-van-der-kleij) wrote :

I applied the patch from upstream to the 4.1.6+dfsg-1ubuntu2.14.04.12 source and recompiled. The patch does indeed fix this issue.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for samba bug 10824" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Robie Basak (racb) wrote :

> This is samba bug 10824 which is fixed in release 4.1.13

Trusty is now on 4.3.11, which post-dates Xenial's release pocket 4.3.8. All supported releases (apart from 12.04, which is on samba 3) have something at least as new as 4.3.11 now. So I presume this bug is now fixed? If not, please explain and reopen.

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

Other bug subscribers

Remote bug watches

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