Filesys::SmbClient doesn't have any knowledge of the protocol flag. I've gone ahead and fixed this in my environment (since I just had scheduled transfers fail because of it). I've supplied the patch here. I make no guarantees, I've done minimal testing, and I'm not responsible for anything that this patch may break in your environment. -- Jeremy Baumgartner
--- SmbClientParser.pm.orig 2018-05-11 10:55:54.033252684 -0500 +++ SmbClientParser.pm 2018-05-11 11:07:15.612066151 -0500 @@ -5,6 +5,9 @@ # Copyright 2000-2002 A.Barbet alian@alianwebserver.com. All rights +reserved. # $Log: SmbClientParser.pm,v $ +# Revision 2.7.1 2018-05-11 11:06:00 jjb0528 +# - Added protocol selection to the options for smbclient +# # Revision 2.7 2004/04/14 21:53:18 alian # - fix rt#5896: Will Not work on shares that contain spaces in names # @@ -83,6 +86,7 @@ $self->Password($ref{password}) if ($ref{password}); $self->Workgroup($ref{workgroup}) if ($ref{workgroup}); $self->IpAdress($ref{ipadress}) if ($ref{ipadress}); + $self->Protocol($ref{protocol}) if ($ref{protocol}); $self->{DIR}='/'; $self->{"DEBUG"} = 0; return $self; @@ -99,6 +103,7 @@ sub Password {if ($_[1]) {$_[0]->{PASSWORD}=$_[1];} return $_[0]->{PA +SSWORD};} sub Workgroup {if ($_[1]) {$_[0]->{WG}=$_[1];} return $_[0]->{WG};} sub IpAdress {if ($_[1]) {$_[0]->{IP}=$_[1];} return $_[0]->{IP};} +sub Protocol {if ($_[1]) {$_[0]->{PROTO}=$_[1];} return $_[0]->{PROTO +};} sub LastResponse { if ($_[1]) {$_[0]->{LAST_REP}=$_[1];} return $_[0]->{LAST_REP};} sub err { @@ -498,17 +503,19 @@ # rearrange_param #-------------------------------------------------------------------- +---------- sub rearrange_param { - my ($self,$command,$dir, $host, $share, $user, $pass, $wg, $ip) = @ +_; + my ($self,$command,$dir, $host, $share, $user, $pass, $wg, $ip, $pr +oto) = @_; if (!$user) {$user=$self->User;} if (!$host) {$host=$self->Host;} if (!$share){$share=$self->Share;} if (!$pass) {$pass=$self->Password;} if (!$wg) {$wg=$self->Workgroup; } if (!$ip) {$ip =$self->IpAdress; } + if (!$proto) {$proto =$self->Protocol; } if (!$dir) {$dir=$self->{DIR}; } my $debug = ($self->{DEBUG} ? " -d".$self->{DEBUG} : ' -d0 '); $wg = ($wg ? ("-W ".$wg." ") : ' '); # Workgroup $ip = ($ip ? ("-I ".$ip." ") : ' '); # Ip adress of server + $proto = ($proto ? ("-m ".$proto." ") : ' '); # Protocol $dir = ($dir ? (' -D "'.$dir.'"') : ' '); # Path # User / Password if (($user)&&($pass)) { $user = '-U "'.$user.'%'.$pass.'" '; } @@ -519,7 +526,7 @@ if ($host) {$host='//'.$host; $path.=$host; } if ($share) {$share='/'.$share;$path.=$share; } $path.='" '; - my $prefix = $self->{SMBLIENT}.$path.$user.$wg.$ip.$debug; + my $prefix = $self->{SMBLIENT}.$path.$user.$wg.$ip.$debug.$proto; return ($self, $command, $prefix, $dir); }

In reply to Re^3: Unable to establish SMB2 connection using Filesys::SmbClient by UID_Zero
in thread Unable to establish SMB2 connection using Filesys::SmbClient by Netras

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.