[Samba] BUILTIN\Administrators - failed to call wbcSidToUid: WBC_ERR_DOMAIN_NOT_FOUND
cerny at svmetal.cz
Tue Sep 5 12:01:37 UTC 2017
Thank you very much for clarifying the ID mapping "magic";)
> You do not need 'posixgroup', it is an auxiliary objectclass of
group, you can add any of the rfc2307 attributes without it.
Well, is there any option to remove it? Because "posixgroup" is on
every group that was migrated from Samba 3.
And I cannot edit this attribute in ADUC (delete button is grayed).
> Try restarting Samba and then run 'getent group Domain\ Admins'
getent group Domain\ Admins
Which is expected, because it has set NIS domain and GID in ADUC. But
when I look to sysvol, I don't see Domain admins but
BUILTIN\Administrators (Domain Admins are members of this group). So I
am confused by behavior of BUILTIN groups.
I made some investigations about BUILTIN\Administrators.
Production domain (migrated from Samba 3):
failed to call wbcSidToUid: WBC_ERR_DOMAIN_NOT_FOUND
Could not convert sid S-1-5-32-544 to uid
ldbsearch -H /var/lib/samba/private/idmap.ldb | grep S-1-5-32-544 -A2
Testing lab domain (provisioned from scratch):
ldbsearch -H /usr/local/samba/private/idmap.ldb | grep S-1-5-32-544
Almost every (except 0, 99 and 100) BUILTIN xidNumber on my migrated
domain starts with 15000. On provisioned domain it starts with 3000000.
Is that the way to fix my errors? Correct idmap.ldb to match cleanly
provisioned Samba AD? Is save to edit this file?
On Tue, 05 Sep 2017 12:22:47 +0200
Jiří Černý via samba <samba at lists.samba.org> wrote:
>> To Rowland:
>>> This was perfectly common, nobody thought this would ever be a
>>> problem,mainly because you had to have a user or group
>>> in /etc/passwd>
>>> or /etc/group mapped to a Samba. Now with AD, you do not need a
>>> or group in /etc/passwd or /etc/group, so any user or group that
>>> the RID as a Unix ID is> probably too low and is denying the use
>>> any local Unix users
>> Yes, but where is main problem/failure? We had working Samba 3
>> with LDAP backend. Made by documentation. We migrated to Samba 4
>> of course with assistance of documentation/wiki.
>> So there was no failure in process of migration, but it lead to ID
>> mapping mess which I can't fix.
>The problem lies way back when the domain was set up. As I said,
>everybody thought that using the RID as a Unix ID was an acceptable
>thing to do. Hindsight has proven this wasn't such a good idea, a lot
>of the RIDs are in the 500 range (including Domain Users). This means
>that if you use the winbind 'ad' backend, you need to set the lower
>Domain range to '500' to get any of your users known to Unix, this
>means you cannot have ANY local Unix users.
>>> I hope you are not thinking of using GPOs, 'Domain Admins' needs
>>> own things is 'sysvol' and cannot if they are a group (the
>>> makes them a group)
>> Of course I am thinking of using GPOs. Windows
>>are ok with it, because it uses SIDs. I have problems only in linux,
>> because bad ID mapping, respectively samba-tool ntacl sysvolcheck,
>> because it's expecting diferent ID numbers as I have.
>> Domain Admins is group. Only deference is that in our (migrated)
>> domain id has objectClass top; posixgroup; group and in cleanly
>> provisioned AD it has only top; group.
>You do not need 'posixgroup', it is an auxiliary objectclass of
>you can add any of the rfc2307 attributes without it.
> But in both cases I see group. So I have to apologize, because I
> probably don't understand you.
> So if I set GID, then ID mapping in linux makes that as group, but
> it's not set, than Samba makes some "magic" and give Domain Admins
> as this "goup" act as user?
>It isn't really magic, idmap on a DC works two ways, the first is
>a user or group first contacts the DC, it is given an xidNumber, this
>is stored in idmap.ldb on the DC, it also set to a 'type'. This can
>'ID_TYPE_UID', 'ID_TYPE_GID' or 'ID_TYPE_BOTH', the later means that
>group is also a user. The second way is if you give a user a
>or give a group a gidNumber, this turns off what is in idmap.ldb and
>makes the user or group become just a user or group, in the case of
>Domain Admins, this stops the group owning anything in 'sysvol'
>> > If you can change the Unix IDs, then this is the way to goNot
>> > problem
>> there in linux side or AUDC to change it. But it doesn't like it
>> help me. Now, I have all BUILTIN groups without GID, cache flushed
>> now luck. Even if I removed all bad GIDs and checked possible
>> collision with UNIX groups. Samba doesn't give me IDs like 30000,
>> something different. Look at my sysvol:
>> getfacl /var/lib/samba/sysvol/
>> getfacl: Removing leading '/' from absolute path names
>> # file: var/lib/samba/sysvol/
>> # owner: 1037
>> # group: 544
>> default:other::---As you can see, there is something with 15000 +
>> pattern. Definitely from old LDAP backend. 544 are
>> BUILTIN\Administrators, 1037 is old UID of COMPANY\Administrator.
>> if I deleted GIDs and flushed cache it doesn't work:
>> wbinfo -i Administrator
>> I am afraid that our domain is bad provisioned (upgraded) from
>> beginning. Is there any tool/advance, how to manually fix/change
>> in Samba AD? And some kind of list of ID which Samba AD uses in
>> "ID magic"?
>> I believe that can be fixed by setting the "right" numbers.
>> Thank you for you help. I really appreciate it.Jiří
Try restarting Sambaand then run 'getent group Domain\ Admins'
More information about the samba