1. Active Directory database has 10K user’s accounts 2. smb.conf has a global configuration setting winbind use default domain = Yes 3. Joined a domain successfully. 4. Verified the join operation with “net testjoin” option 5. “wbinfo –u” returns the list of user’s accounts 6. Utility # net usersidlist was executed. It returns empty pages
This is a proposed fix for this problem samba-3.0.13/source/utils/net_rpc.c =================================================================== +++ source/utils/net_rpc.c Mon May 16 18:16:05 2005 @@ -3495,6 +3495,7 @@ fstring name; int i; struct user_token *result; + char *my_domain = smb_xstrdup(opt_target_workgroup); /* Send request to winbind daemon */ @@ -3538,9 +3539,10 @@ DEBUG(3, ("%s\n", name)); - if (p == NULL) - continue; - + if (p == NULL) { + strupper_m(my_domain); + get_user_sids(my_domain, name, &(result[i].token)); + } else { *p++ = '\0'; fstrcpy(domain, name); @@ -3548,6 +3550,7 @@ fstrcpy(user, p); get_user_sids(domain, user, &(result[i].token)); + } i+=1; }
*** Bug 2719 has been marked as a duplicate of this bug. ***
Created attachment 1232 [details] Patch Could you try the attached (slightly different) patch? Thanks, Volker
New tested diff file Index: bfc/linux/samba-3.0.x/source/utils/net_rpc.c =================================================================== --- source/utils/.CC/cache/net_rpc.c@@/main/bd_merge_br/1 Fri May 13 16:56:28 2005 +++ source/utils/net_rpc.c Tue May 17 12:08:45 2005 @@ -3496,6 +3496,13 @@ int i; struct user_token *result; + if (lp_winbind_use_default_domain() && + (opt_target_workgroup == NULL)) { + d_printf("workgroup parameter is empty.\n" + "Please, configure the workgroup parameter.\n"); + return False; + } + /* Send request to winbind daemon */ ZERO_STRUCT(request); @@ -3538,16 +3545,15 @@ DEBUG(3, ("%s\n", name)); - if (p == NULL) - continue; - + if (p == NULL) { + get_user_sids(opt_target_workgroup, name, &(result [i].token)); + } else { *p++ = '\0'; - fstrcpy(domain, name); strupper_m(domain); fstrcpy(user, p); - get_user_sids(domain, user, &(result[i].token)); + } i+=1; }
Fixed with revision 6880. Thanks for finding it! Volker
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.