[Samba] Filesys::SmbClient & kerberos bug?

David Dorsey trogdorsey at gmail.com
Mon Jun 19 14:54:25 GMT 2006


I'm trying to use Filesys::SmbClient to connect to a windows share using
kerberos to authenticate, however, I get a permission denied error.  I've
tried this on a FC5 with samba 3.0.22 and on Solaris 9 with samba 3.0.22 and
3.0.23rc2.  Using kerberos with the command smbclient works however.  If I
specify a password, I can connect; however, I need to use kerberos.
Since the smbclient command works with kerberos, it seems to be a problem
with Filesys::SmbClient.  I've included my script just in case I'm doing
some completely wrong

use POSIX;
use Filesys::SmbClient;
use strict;

my $smb = new Filesys::SmbClient(
  username => "",
  workgroup => "",
  flags => SMB_CTX_FLAG_USE_KERBEROS | SMB_CTX_FLAG_FALLBACK_AFTER_KERBEROS,
  debug => 10
);

my $fd = $smb->opendir("smb://machine/share");
if($fd == 0)
{
  print "Could not open directory: $!\n";
  exit;
}
foreach my $n($smb->readdir($fd))
{
  print $n, "\n";
}

Thanks,


Dave


More information about the samba mailing list