Index: utils/net_ads.c =================================================================== --- utils/net_ads.c (revision 5952) +++ utils/net_ads.c (working copy) @@ -94,8 +94,13 @@ { ADS_STRUCT *ads; - ads = ads_init(NULL, opt_target_workgroup, opt_host); + /* if netbios is disabled we have to default to the realm from smb.conf */ + if ( lp_disable_netbios() && *lp_realm() ) + ads = ads_init(lp_realm(), opt_target_workgroup, opt_host); + else + ads = ads_init(NULL, opt_target_workgroup, opt_host); + if (ads) { ads->auth.flags |= ADS_AUTH_NO_BIND; }