smbclient -L can't see shares with spaces in the name

Christopher R. Hertel crh at ubiqx.mn.org
Sun Dec 22 02:41:01 GMT 2002


This has been noted.  Richard and I were talking about it recently.  
Another side-effect is that smbclient cannot "see" shares with names
longer than 12 characters, because such names are not returned by the
old-style NetShareEnum call.

Note also that none of the calls appear to work properly on port 445.  If 
the call is made on 445 a Windows server will respond, but the response 
will be empty.  Listing of NBT workgroups, servers, and shares must be 
done on port 139, it seems.  I am not sure whether this is true of the 
newer NetrShareEnum call.
         ^

Chris -)-----

On Sat, Dec 21, 2002 at 07:10:57PM -0600, Steve Langasek wrote:
> It appears that 'smbclient -L' is not able to view shares on an NT
> server (or above) that are created with a space in the name, although it
> is possible to access these shares if the name is given explicitly.  The
> reason is that NT, 2K, and XP will not return these shares in response
> to a NetShareEnum, presumably because (as a warning under NT suggests
> when creating such a share) DOS clients will be confused by such share
> names.
> 
> Windows clients get around this by doing a NetrShareEnum call on
> \SRVSVC instead.  Samba also implements this functionality, but the
> necessary code is not linked into smbclient.
> 
> Should it be?  It seems easy enough to link it in, but so far smbclient
> doesn't include any RPC code.  Is it better to recommend that people use
> one of the other RPC-aware tools (e.g., 'net share')?  In that case,
> what should be done for libsmbclient, which also has this problem?
> 
> -- 
> Steve Langasek
> postmodern programmer



-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the samba-technical mailing list