Re: [Samba] Domain Users group with multiple gid
- Date: Thu, 12 Apr 2018 18:06:40 +0100
- From: Clemente Aguiar via samba <samba@xxxxxxxxxxxxxxx>
- Subject: Re: [Samba] Domain Users group with multiple gid
> No dia 10/04/2018, às 15:04, Rowland Penny via samba <samba@xxxxxxxxxxxxxxx> escreveu:
> On Tue, 10 Apr 2018 14:46:50 +0100
> Clemente Aguiar <ca-mlsamba@xxxxxxxxx> wrote:
>>> I don't have that many users and I really want to fix it, and I
>>> don't have a problem with fixing file ownership.
> If you do change them, you will have to reset ownership of any files &
>>> You say "just remove the uidNumber & gidNumber attributes", does
>>> this mean that new IDs will be assigned automatically?
> They possibly have been allocated already, but if not, then yes. There
> is a bit of a gotcha though, if you have more than one DC, they will
> probably get different Unix IDs on each DC.
>>> And most important, can you tell me exactly how to do this (remove
>>> the uidNumber & gidNumber attributes), i.e what are the commands, I
>>> would really appreciate. Like I said in the initial post, I have
>>> little knowledge about Samba4.
> The easiest way would be to use ldbedit on the DC. Open a terminal and
> enter this:
> ldbedit -e nano -H /usr/local/samba/private/sam.ldb
> Replace 'nano' with your favourite editor and
> '/usr/local/samba/private' with the path to 'sam.ldb' on your system.
> Search for all instances of 'uidNumber' & 'gidNumber' and delete them
> all (remove the entire line and close up the gap)
> Save and close the editor, your users & groups will get new 'xidNumber'
> attributes in idmap.ldb as they connect to AD.
Just to let you know a few things.
First, based on the command that you mentioned, I viewed idmap.ldb and searched for the duplicate id (1901) and there it was.
Removed the entire record, and the initial problem that I reported (duplicate gid for Domain Users) was fixed.
This is the record I remove:
# record 133
Secondly, I tried removing the uidNumber atribute from one user (myself) on a test machine and when saving I got the following error:
failed to modify CN=Clemente Aguiar,CN=Users,DC=arditi,DC=pt - objectclass_attrs: at least one mandatory attribute ('uidNumber') on entry 'CN=Clemente Aguiar,CN=Users,DC=arditi,DC=pt' wasn't specified!
So I suppose that I cannot fix the low id numbers as you mentioned.
To unsubscribe from this list go to the following URL and read the