[PATCH] samba-tool: Easily edit a users object in AD

Rowland Penny rpenny at samba.org
Wed Jun 28 09:21:57 UTC 2017

On Wed, 28 Jun 2017 20:40:15 +1200
Andrew Bartlett <abartlet at samba.org> wrote:

> On Wed, 2017-06-28 at 09:32 +0100, Rowland Penny via samba-technical
> wrote:
> > 
> > OK, the attached patch should meet all problems raised against the
> > first one, except a test.
> > 
> > I am struggling with the test. I can see how I could write a test
> > that would:
> > 
> > Create a user to use in the test.
> > Run 'samba-tool user edit USER'
> > 
> > I cannot then see how I can write code to simulate a sysadmin
> > altering the users object and/or saving and closing the editor.
> You replace the EDITOR with a script that modifies the object's LDIF.
> Andrew Bartlett

At first glance I thought 'how will that work?', but I think I
understand it. Write another script that opens the temp file, makes a
few changes and then writes it back and the script then ends allowing
the rest of 'samba-tool user edit' to continue.

OK, I will give it a try, any objections to using bash for the
script ? ;-)


More information about the samba-technical mailing list