Can smbclient or libsmbclient do NetrShareEnum ?
rsharpe at richardsharpe.com
Wed Sep 8 18:56:34 GMT 2004
On Wed, 8 Sep 2004, Rafal Szczesniak wrote:
> On Tue, Sep 07, 2004 at 03:38:17PM -0700, David Wuertele wrote:
> > My app needs to query Windows hosts using the NetrShareEnum RPC. It
> > isn't obvious from the docs whether I can accomplish this with
> > the smbclient app or the libsmbclient.so library. Is this
> > implemented? Where is the API documented?
> Nowhere, actually :)
> Yes, this function is implemented. Take a look at rpc_client/cli_srvsvc.c
> file. Find function cli_srvsvc_net_share_enum(). That's what you're
> looking for. Obviously, you have to learn how to properly call this
> function, if you haven't ever done it yet (ie. establish smb session,
> open named pipe, etc.).
Well, it would be easier if the libsmbclient (or libsmb) code would call
this function at the appropriate point, but it doesn't as far as I am
This will be much easier in Samba4, I suspect.
Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
More information about the samba-technical