NetShareEnumAll returns truncated strings

Dhananjay Sathe dhananjaysathe at
Tue Jun 28 00:16:51 MDT 2011

Hi Ricardo,

This could be some help , the code works in my case , i get the following
names :

[u'netlogon', u'sysvol', u'IPC$']

this is the code i am using in my code :

        info_ctr = srvsvc.NetShareInfoCtr()
        info_ctr.level = 502
        (info_ctr, totalentries, self.resume_handle_share) = \
server_unc, info_ctr,
Note :
self.max buffer is = -1
self.server_unc = '\\' + server_address
and resume handle is initialised to 0x00000000 and reused through the
program .

you could look at list_shares and list_shares_all methods in

It works against samba 4 alpha 15, and against a git build a few weeks ago .
Dunno if something has gone wrong recently
what exact version of samba 4 are you testing your code against ?

Hope that was useful in any way :)

Cheers !!!

Dhananjay Deepak Sathe | +919764871950
dhananjaysathe at,f2009260 at
Blog :
2nd Year Undergraduate,
BE(Hons) Electronics and Instrumentation,
BITS Pilani Goa Campus.

More information about the samba-technical mailing list