[PATCH] Add test for 'net ads (join|leave)

Andrew Bartlett abartlet at samba.org
Sun Nov 1 18:13:04 UTC 2015


On Sun, 2015-11-01 at 14:26 +0200, Uri Simchoni wrote:
> 
> On 10/31/2015 07:13 AM, Uri Simchoni wrote:
> > 
> > Strange..  I did a make test on the original as well as the
> > modified 
> > patch. I will have a look later.
> > 
> > בתאריך 31 באוק 2015 07:04,‏ "Jeremy Allison" <jra at samba.org 
> > <mailto:jra at samba.org>> כתב:
> > 
> >     On Wed, Oct 28, 2015 at 11:05:23AM +0200, Uri Simchoni wrote:
> >     > How about adding a testjoin with machine account as well (see
> >     attached)?
> >     > Otherwise RB+ me.
> > 
> >     FYI. Tried to push this but got:
> > 
> >     /memdisk/jra/a/b24596/samba/testprogs/blackbox/test_net_ads.sh:
> >     17: source: not found
> > 
> >     in the autobuild fail. I think this line:
> > 
> >     +source `dirname $0`/subunit.sh
> > 
> >     is incorrect. subunit.sh is found in testprogs/blackbox/
> >     so it looks right, but something isn't working in autobuild.
> > 
> >     Jeremy.
> > 
> "source" is bash-specific. We should use "." instead.
> 
> But before fixing and pushing, Andrew's comment seems correct to me -
> wouldn't "net join" change the shared secret between the running
> server 
> and the domain and thus affect the server? It seems like it would be 
> better to run it with an smb.conf which has "netbios name" set to
> some 
> bogus name, and this way the test would run on an a different
> account.
> 
> (I tried just passing a command line option to net, but it didn't
> manage 
> to pass unharmed through the subunit functions, because of the
> space).

I think you should pass in a whole smb.conf, pointing at a different
location (to get an effect like samba-tool domain join's --targetdir). 

I any case, to specify options with spaces, remember that our smb.conf
parser is whitespace insensitive except for inside the option value, so
you can omit the spaces, eg --option=ntlmauth=true

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list