[Samba] Enumeratings shares on Samba (3/4) servers with vbs

Achim Gottinger achim at ag-web.biz
Sat Nov 9 15:51:46 MST 2013


Hi,

Working on an login script here for my samba4 servers. I try to get an 
list of the shares on server with this vb code.

Set shares = GetObject("WinNT://SERVER/LanmanServer")

For Each s In shares

   WScript.Echo s.Name

Next

The code works fine against Windows 2003/2008 R2. But if SERVER is an 
Samba Server (tested 3.6.x/4.0.10) i get an group not found error.

Other this like printer enumeration works

Set printers = GetObject("WinNT://SERVER,Computer")

printers.Filter=Array("PrintQueue")

For Each p In printers

   WScript.Echo p.Name

Next

Do i have to add some config to my smb.conf to get the LanmanServer 
queries resolved?

Thanks in advance
achim~




More information about the samba mailing list