[PATCH] add "net ads groupmember" functionality

David Wojtowicz davidw at uiuc.edu
Wed May 12 14:05:12 GMT 2004


Hello,

 I *really* appreciate the ADS integration efforts in Samba 3.0

I was looking for a way to list/add/delete users in/to/from ADS groups using
the "net" command.   Having found that functionality missing, I'm
contributing a patch to do so.  It is patterned after the "net rap
groupmember" function and adds the following functions for ADS.

 net ads groupmember list [group]
 net ads groupmember add [group] [member]
 net ads groupmember delete [group] [member]


The main modification is to util/net_ads.c to supply the
"net_ads_groupmember" function.  The other modifications to util/net.c and
util/net_help.c provide the necessary linkages to the new function and
additions to the usage text.   I've tried to follow the style and
conventions of the existing code as much as possible.

My one minor concern is how to free memory returned from ads_get_dn().  It
wasn't clear to me what I should use to free it. (Not that it matters too
much in this case as the program immediately exits afterwards, but it's good
to be tidy with memory).

Because I've found that posting sometimes messes up patch text, I have
placed the patch on the web here:

http://www.atmos.uiuc.edu/~davidw/samba_net_ads_groupmember_patch.txt

Thanks for considering it.  Again, thank you for the ADS integration efforts
in Samba.

---------------------------------------------------------------
David Wojtowicz, Sr. Research Programmer
Dept of Atmospheric Sciences, University of Illinois
davidw(at)uiuc.edu (217) 333-8390



More information about the samba-technical mailing list