--- source3/utils/net.c.orig 2017-10-31 08:31:04.125695025 +0100 +++ source3/utils/net.c 2017-10-31 08:31:30.480757684 +0100 @@ -1036,6 +1036,10 @@ exit(1); } + /* this makes sure that when we do things like call scripts, + that it won't assert because we are not root */ + sec_init(); + status = messaging_init_client(c, samba_tevent_context_init(c), &c->msg_ctx); @@ -1104,10 +1108,6 @@ load_interfaces(); - /* this makes sure that when we do things like call scripts, - that it won't assert because we are not root */ - sec_init(); - if (c->opt_machine_pass) { /* it is very useful to be able to make ads queries as the machine account for testing purposes and for domain leave */