I joined my box to a (pre windows 2000)domain in the network. And after that if I give wbinfo -u and wbinfo -g, I get the groups and users. And I ran the code nss_testers(or somethig like that, written by Tridge). The users list is enumerated but the group list fails. It technically hangs at point where it retries again and again while accessing the group list.
Here is the code that tries to enumerate the groups in the domain.
Any help is appricated.
static void nss_test_groups(void)
{
struct group *grp;
int i = 0;
nss_setgrent();
/* loop over all groups */
while ((grp = nss_getgrent())) {
if (grp == NULL)
break;
printf("Testing group %s\n", grp->gr_name);
printf("getgrent: "); print_group(grp);
grp = nss_getgrnam(grp->gr_name);
if (grp){
printf("getgrnam: "); print_group(grp);
}
grp = nss_getgrgid(grp->gr_gid);
if (grp) {
printf("getgrgid: "); print_group(grp);
}
printf("\n");
i++;
if (i > 2)
break;
}
nss_endgrent();
}
Here is the code that tries to enumerate the groups in the domain.
Any help is appricated.
static void nss_test_groups(void)
{
struct group *grp;
int i = 0;
nss_setgrent();
/* loop over all groups */
while ((grp = nss_getgrent())) {
if (grp == NULL)
break;
printf("Testing group %s\n", grp->gr_name);
printf("getgrent: "); print_group(grp);
grp = nss_getgrnam(grp->gr_name);
if (grp){
printf("getgrnam: "); print_group(grp);
}
grp = nss_getgrgid(grp->gr_gid);
if (grp) {
printf("getgrgid: "); print_group(grp);
}
printf("\n");
i++;
if (i > 2)
break;
}
nss_endgrent();
}