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

Rowland Penny rpenny at samba.org
Fri Dec 8 13:22:54 UTC 2017


On Fri, 8 Dec 2017 13:49:50 +0100
Bjoern Baumbach <bb at sernet.de> wrote:

> Hi Rowland,
> 
> thank you for the review.
> 
> 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

Of course you would possibly have to create the OU first:

samdb.create_ou
  
> 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.
> 
> 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.

> 
> > There are also lines over 80 columns.
> 
> I'll fix this.
> 
> > 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

Rowland



More information about the samba-technical mailing list