[PATCHES] samba-tool: implement user show command to display a user AD object

Rowland Penny rpenny at samba.org
Fri Dec 8 15:49:45 UTC 2017


On Fri, 8 Dec 2017 16:32:40 +0100
Bjoern Baumbach <bb at sernet.de> wrote:

> On 12/08/2017 02:22 PM, Rowland Penny via samba-technical wrote:
> > On Fri, 8 Dec 2017 13:49:50 +0100
> > Bjoern Baumbach <bb at sernet.de> wrote:
> >> On 12/08/2017 01:02 PM, Rowland Penny wrote:
> >>> I don't really understand the reason behind this patch, what does
> >>> it give you that an ldbsearch doesn't, where would you use it ?
> >>
> >> I would like to introduce a user move command, later, to move a
> >> user into an OU or a different container. With the show command
> >> you can easily display the users DN and further attributes.
> >
> > Why not just create the move command, now this would be useful, i.e.
> > samba-tool user move username OU-to-move-to
> >
> > Find the user, exit if not found
> > Check the user isn't already in the OU
> > then use samba.Ldb.rename
> 
> I already did it in a similar way. I'll provide the patches as soon
> I've added a proper test.
> But I just mentioned it as an example, that you might want to check
> the current OU of the user before you move the user.

You can do this with samba-tool user edit, but it is not really down to
just me, perhaps someone else will give their opinion.

> 
> >> I assume that there are users which do not make use of the
> >> ldb-tools but of the samba-tool. The usage is more easy and looks
> >> more generic for them - some of the users are afraid of using the
> >> ldb commands directly.

I can understand this, but still cannot see what your patch gives Samba
what it doesn't already have ;-)

> >>
> >> Anyway, if you ask "what does it give you that an ldbsearch
> >> doesn't", we could also remove commands like edit (can be done by
> >> ldbedit), list (can be done by ldbsearch), delete (can be done by
> >> ldbdel), ... But it's nice to have all the commands on one place
> >> where a user would expect and like too see it.
> >
> > well yes, but I cannot see the point in having something that just
> > gives you a DN and possibly other attributes. If you need the DN to
> > do something, you might as well write a script around ldbsearch and
> > ldbmodify etc. This is just my opinion however, others may think
> > differently.
> 
> Yes of course, I appreciate that you tell me your opinion! :-)
> 
> As I said, I think it's nice to have a small command to request the
> user information which can be easily used for all users.
> 
> >>> There are also lines over 80 columns.
> >>
> >> I'll fix this.
> I've attached a new patch.
> >>> I would also think that the typos should be in separate patches.
> >>
> >> It is already a separate patch. Or would you split the patch for
> >> some reason?
> >
> > Yes, it is just one patch, but I think it should be separate
> > patches, your main patch does not rely on the typo patches and
> > visa-versa
> 
> Sorry, but I do not understand what you mean. The typos are all in the
> same code, why should I separate them? Or do you not like that I send
> them all together in one file?

Okay, the typos have nothing to do with your your proposed main patch,
they are 'repairing' a small problem, so should be in their own patch
and as such should be pushed, but your main patch will work without
them, so it should be in its own patch, which we could then discuss the
merits of ;-)

Rowland



More information about the samba-technical mailing list