[Samba] winbind fails to list all groups with adminCount not set

Peter Kruse pk at q-leap.com
Wed Feb 16 11:32:44 GMT 2005

samba version 3.0.10
Windows ADS in native mode

Hello all,

We have samba running on a cluster with 65K users and groups.
Some of these (security-) groups contain other (security-) groups
that contain the useraccounts.  Those "meta-groups" are only listed
for some users.  Example:
group A contains group B, and group B contains user A.

The following script will list the groups that a user is
a member of:


gids=$(wbinfo -r $1)
if [ $retval -ne 0 ]; then
         echo wbinfo returned an error >&2
         exit $retval

for g in $gids
         echo $(wbinfo -s $(wbinfo -G $g))

It will only list both groups A and B if the windows LDAP
attribute "adminCount" is set.  If this attribute is not
set then the script will only show group B.  I confirmed this
for many users without exception.
To check if adminCount is set or not I used this command:

ldapsearch -D <binddn> \
-w <password> -h <windows-ads> -x -b \

Microsoft says in this article:


"Indicates that a given object has had its ACL's changed to a more
secure value by the system because it was a member of one of the
administrative groups (directly or transitively)."

and this attribute is set

"When an object is added to an administrative group."

The attribute is set by the system and you cannot set it
via a frontend (I tried gq).  To be honest I don't know
what I have to do to set this attribute.
But my question is:  Why does winbind only list all groups
if this attribute is set?

Hope you can help,


More information about the samba mailing list