net ads join prevents a join where the machine name is longer than 15 characters, but Windows does not

Richard Sharpe realrichardsharpe at gmail.com
Fri Aug 14 15:56:38 UTC 2015


Hi folks,

Currently, in source3/libnet/libnet_join.c:libnet_join_pre_processing
we have this code:

        if (strlen(r->in.machine_name) > 15) {
                libnet_join_set_error_string(mem_ctx, r,
                        "Our netbios name can be at most 15 chars long, "
                         "\"%s\" is %u chars long\n",
                         r->in.machine_name,
                         (unsigned int)strlen(r->in.machine_name));
                return WERR_INVALID_PARAM;
        }

However, that is not what Windows does. Win 8 and probably Win7 will
truncate the name to 15 characters and join using that, but will then
use the full name when registering with DNS.

I will look at fixing that, but if someone else gets to it before me,
that is OK too.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list