[Samba] samba-tool cannot add or remove group members

Rowland Penny rpenny at samba.org
Tue Jun 13 19:44:13 UTC 2017


On Tue, 06 Jun 2017 11:34:05 -0500
Mircea Husz via samba <samba at lists.samba.org> wrote:

> On Tue, 2017-05-30 at 12:18 +0100, Rowland Penny via samba wrote:
> > On Tue, 30 May 2017 13:09:38 +0200 (CEST)
> > > Sébastien QUESSON via samba <samba at lists.samba.org> wrote:
> > 
> > > > > > All I can think of is, you have a user with
> > > > > > > > > > > 'sAMAccountName=username' and another with
> > > > > > > > > > > 'CN=username',
> this
> > > > > > could lead to 'len(targetmember)' being 2
> > > 
> > > yeah, that's the point
> > > I created my users with : samba-tool user add user password
> > > --use-username-as-cn
> > > 
> > > > OK, I think I have a fix, find 'samdb.py' on your DC, open it in
> > > > your favourite editor and find this line:
> > > > You should then be able to add your user to the group:
> > > 
> > > samba-tool group addmembers is OK now!
> > > do I have to maintain manually this file, or will it be ported in
> > > next samba versions? thank you very much for your great support,
> > > Rowland!
> > > 
> > 
> > 
> > > I will prepare a patch and submit it and see what the rest of the
> devs
> > think.
> > 
> > Rowland
> > 
> 
> Rowland, did you get an answer to your question ?  I think it will
> help me know whether I should 
> update the CN fields to contain the user name as created by ADUC, or
> leave CN the same as sAMAccountName.
> 
> Thanks,
> -Mircea
> 
> 

OK, A slightly modified patch (by adding the user & group objectclasses
to the search expression) has been accepted into git and so it should
be in 4.7

Rowland



More information about the samba mailing list