(no subject)

Steven French sfrench at us.ibm.com
Thu Nov 1 10:31:26 GMT 2001

An alternate way to do this may be to add UserGetGroups to the clirap2.c
code that Jim and I added to the head branch (for use by the new "net"
utility) a few weeks ago.   We added a function called cli_NetGroupGetUsers
that does list the users that are members of the named group (works to at
least NT, Win2K, and OS/2 domain controllers so far).   You seem to want
the reverse i.e. something like a cli_NetUserGetGroups which is possible
and could be remoted via either RAP or RPC.   The trick is simply that it
may not handle local groups (I have not been able to find the RAP ordinal,
if there is one, for a UserGetLocalGroups unfortunately) - but certainly it
could be done via RPC.   Have you tried the get_samr_query_usergroups call
in cli_samr.c to see whether it returns localgroups too?

I will experiment with the RAP code for this (I have also been cleaning up
more of net.c and experimenting with the ServiceInstall RAP calls for
stopping and starting services remotely) to see if I can get something
useful working.

>Date: Wed, 31 Oct 2001 15:33:18 -0800
>From: Ben Johnson <ben at blarg.net>
>To: samba-technical at lists.samba.org
>Subject: getting local groups/aliases via rpc?
>I recently downloaded the latest samba and am looking through the
>rpcclient code.  It looks like a lot has changed in the last few months,
>and like the functionality I couldn't put together back then has been
>added for me.  I'm still missing something though. I have a feeling it's
>there but it's not clear.
>My goal is to authenticate a user to an NT server and get a list of
>groups for that user from the NT machine.  Authenticating and fetching
>_global_ groups appears to be straight forward, but I can't figure out,
>so far, how to fetch the local groups associated with the authenticating

Steve French
Senior Software Engineer
Linux Technology Center
IBM Austin
phone: 512-838-2294, T/L 678-2294;
pager: 512-480-6393; cell phone: 512-296-4687
email: sfrench at us.ibm.com

More information about the samba-technical mailing list