Hi,
     I'm trying to use SmbClientParser to implement a simple SMB
crawler. After a lot of effort, I still could not get it to work. Here
is my small test script:
[CODE]
#!/usr/bin/perl

use POSIX;
use Filesys::SmbClientParser;
use DBI();
use Socket;
use Sys::Hostname;
use strict;

my $host;

my $smb = new Filesys::SmbClientParser
  (undef,
   (
    user     => '',
    password => ''
   ));
   
  $smb->Debug('1'); 
  
  $smb->Host('localhost');
   
  my @l = $smb->GetShr;
  foreach (@l) {print $_->{name},"\n";}
[/CODE]

All i got for the output is the default usage of smbclient
[CODE]
 ==> SmbClientParser::command /usr/bin/smbclient     -d1-L '\\localhost'  -D "/"
Usage: [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage]
[-R|--name-resolve                NAME-RESOLVE-ORDER]
        [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST]
        [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan]
        [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES]
        [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL]
        [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE]
        [-V|--version] [-O|--socket-options SOCKETOPTIONS]
        [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP]
        [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos]
        [-A|--authentication-file FILE] [-S|--signing on|off|required]
        [-P|--machine-pass] service <password>
[/CODE]

I'm using Samba 3.0.2a on Mandrake Linux 10. Any help would be very
much appreciated. Thank you.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to