{"wipe", 0, POPT_ARG_NONE, &c->opt_wipe},
/* Options for 'net registry import' */
{"precheck", 0, POPT_ARG_STRING, &c->opt_precheck},
+ /* Options for 'net ads join' */
+ {"no-dns-updates", 0, POPT_ARG_NONE, &c->opt_no_dns_updates},
POPT_COMMON_SAMBA
{ 0, 0, 0, 0}
};
static int net_ads_join_usage(struct net_context *c, int argc, const char **argv)
{
- d_printf(_("net ads join [options]\n"
+ d_printf(_("net ads join [--no-dns-updates] [options]\n"
"Valid options:\n"));
d_printf(_(" createupn[=UPN] Set the userPrincipalName attribute during the join.\n"
" The deault UPN is in the form host/netbiosname@REALM.\n"));
}
/*
- * We try doing the dns update (if it was compiled in).
+ * We try doing the dns update (if it was compiled in
+ * and if it was not disabled on the command line).
* If the dns update fails, we still consider the join
* operation as succeeded if we came this far.
*/
- _net_ads_join_dns_updates(c, ctx, r);
+ if (!c->opt_no_dns_updates) {
+ _net_ads_join_dns_updates(c, ctx, r);
+ }
TALLOC_FREE(r);
TALLOC_FREE( ctx );