mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
add class KerberosApacheAuth and example code
This commit is contained in:
parent
aa542ff141
commit
e8df1df9a2
3 changed files with 113 additions and 46 deletions
19
example-apache-kerberos.php
Normal file
19
example-apache-kerberos.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
require('vendor/autoload.php');
|
||||
|
||||
// dfs paths not working
|
||||
$host = 'dc.domain.local';
|
||||
$share = 'netlogon';
|
||||
|
||||
$auth = new \Icewind\SMB\KerberosApacheAuth();
|
||||
$serverFactory = new \Icewind\SMB\ServerFactory();
|
||||
|
||||
$server = $serverFactory->createServer($host, $auth);
|
||||
|
||||
$share = $server->getShare($share);
|
||||
|
||||
$files = $share->dir('/');
|
||||
foreach ($files as $file) {
|
||||
echo $file->getName() . "\n";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue