Index: nsswitch/winbindd_ads.c =================================================================== RCS file: /home/cvs/samba/source/nsswitch/winbindd_ads.c,v retrieving revision 1.43.2.26 diff -u -r1.43.2.26 winbindd_ads.c --- nsswitch/winbindd_ads.c 13 Oct 2003 14:03:06 -0000 1.43.2.26 +++ nsswitch/winbindd_ads.c 11 Nov 2003 00:47:53 -0000 @@ -93,7 +93,7 @@ const char *attrs[] = {"userPrincipalName", "sAMAccountName", "name", "objectSid", "primaryGroupID", - "sAMAccountType", NULL}; + NULL}; int i, count; ADS_STATUS rc; void *res = NULL; @@ -137,13 +137,6 @@ DOM_SID *sid2; DOM_SID *group_sid; uint32 group; - uint32 atype; - - if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype) || - ads_atype_map(atype) != SID_NAME_USER) { - DEBUG(1,("Not a user account? atype=0x%x\n", atype)); - continue; - } name = ads_pull_username(ads, mem_ctx, msg); gecos = ads_pull_string(ads, mem_ctx, msg, "name"); Index: nsswitch/winbindd_group.c =================================================================== RCS file: /home/cvs/samba/source/nsswitch/winbindd_group.c,v retrieving revision 1.51.2.25 diff -u -r1.51.2.25 winbindd_group.c --- nsswitch/winbindd_group.c 10 Aug 2003 22:01:11 -0000 1.51.2.25 +++ nsswitch/winbindd_group.c 11 Nov 2003 00:47:53 -0000 @@ -151,15 +151,10 @@ occur in Universal groups on a Windows 2000 native mode server. */ - if (name_types[i] != SID_NAME_USER) { - DEBUG(3, ("name %s isn't a domain user\n", the_name)); - continue; - } + /* make sure to allow machine accounts */ - /* Don't bother with machine accounts */ - - if (the_name[strlen(the_name) - 1] == '$') { - DEBUG(10, ("%s is machine account\n", the_name)); + if (name_types[i] != SID_NAME_USER && name_types[i] != SID_NAME_COMPUTER) { + DEBUG(3, ("name %s isn't a domain user\n", the_name)); continue; } Index: nsswitch/winbindd_user.c =================================================================== RCS file: /home/cvs/samba/source/nsswitch/winbindd_user.c,v retrieving revision 1.43.2.20 diff -u -r1.43.2.20 winbindd_user.c --- nsswitch/winbindd_user.c 10 Aug 2003 22:01:11 -0000 1.43.2.20 +++ nsswitch/winbindd_user.c 11 Nov 2003 00:47:58 -0000 @@ -148,15 +148,13 @@ return WINBINDD_ERROR; } - if (name_type != SID_NAME_USER) { + if (name_type != SID_NAME_USER && name_type != SID_NAME_COMPUTER) { DEBUG(1, ("name '%s' is not a user name: %d\n", name_user, name_type)); return WINBINDD_ERROR; } - /* Get some user info. Split the user rid from the sid obtained - from the winbind_lookup_by_name() call and use it in a - winbind_lookup_userinfo() */ + /* Get some user info. */ if (!(mem_ctx = talloc_init("winbindd_getpwnam([%s]\\[%s])", name_domain, name_user))) { @@ -528,15 +526,6 @@ } name_list = ent->sam_entries; - - /* Skip machine accounts */ - - if (name_list[ent->sam_entry_index]. - name[strlen(name_list[ent->sam_entry_index].name) - 1] - == '$') { - ent->sam_entry_index++; - continue; - } /* Lookup user info */ Index: nsswitch/winbindd_util.c =================================================================== RCS file: /home/cvs/samba/source/nsswitch/winbindd_util.c,v retrieving revision 1.73.2.36 diff -u -r1.73.2.36 winbindd_util.c --- nsswitch/winbindd_util.c 22 Oct 2003 23:38:20 -0000 1.73.2.36 +++ nsswitch/winbindd_util.c 11 Nov 2003 00:47:58 -0000 @@ -337,10 +337,6 @@ { NTSTATUS result; TALLOC_CTX *mem_ctx; - /* Don't bother with machine accounts */ - - if (name[strlen(name) - 1] == '$') - return False; mem_ctx = talloc_init("lookup_sid_by_name for %s\n", name); if (!mem_ctx)