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

Bjoern Baumbach bb at sernet.de
Fri Dec 8 15:32:40 UTC 2017


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.

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

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?

Best regards,
Björn

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-tool_user-show.patch
Type: text/x-patch
Size: 7588 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171208/b0f85397/samba-tool_user-show.bin>


More information about the samba-technical mailing list