Listing shares

Martin Koller koller at etm.at
Wed Jan 29 16:59:36 GMT 2003


Danny Smith wrote:

> I've just come across a problem listing shares on both samba and Win*
> boxes using the samba suite.
> Initially I tried using 'smbclient -L' and parsing the output using a
> perl script, which works to a degree.
> The problem is that the V2.x.x smbclient uses the old-style "RAP" calls
> to talk to the server, which are limited to 13 charcter return values.
> I overcame this by using a V3 'net rpc share' command instead, and
> discovered that the output is limited by the format string in net_rpc.c
> to 12 characters instead (net_rpc.c:1125 and net_rpc.c:1128). Surely
> this is a little short sighted?
> I've got around the problem for now, by changing the format strings, but
> it's maybe worth looking at a more generic solution?
> 
> Personally I think it would be nice to be able to pass a format
> specifier to such commands, for use in these kinds of cases. Does anyone
> have any views on that? Assuming people are agreeable to it, I'm happy
> to attempt some patches...

I've not much knowledge about things in samba, but I had the same problem
using Linux/KDE in a Windows network and browsing the shares on a windows
box ... I simply did not get all shares due to the problem you described.

I see this as a major bug, which limits the interoperability and must
therefore be fixed.

Martin



More information about the samba-technical mailing list