[Samba] NetUserGetGroups query
Qiang.Xu at fujixerox.com
Thu Dec 13 08:25:16 GMT 2007
Recently I have been involved in a task to use LANMAN protocol to determine whether a user belongs to a certain group.
What I know is it is necessary to send out a NetUserGetGroups request, and wait for the response from the server, if there is any.
We are using samba client 3.0.25a. In the source code, I found there are two functions are related to this request: cli_NetUserGetGroups() and api_NetUserGetGroups(). I guess what is really used may be the former - NetUserGetGroups(). Anyone can confirm?
I understand that we should not directly deal with this function. The compiled binary is smbclient_x, and all jobs are performed through this binary with a series of options and arguments. What I want to know is, in my situation, if I want to determine a user's group, what options and arguments shoud I pass to the binary smbclient_x?
More information about the samba