[Samba] Missing deprecations from CHANGELOG 4.14

Rowland Penny rpenny at samba.org
Wed Aug 4 18:51:03 UTC 2021


On Wed, 2021-08-04 at 09:12 +0200, Matthias Kühne | Ellerhold AG via
samba wrote:
> Hallo Rowland,
> 
> Am 03.08.21 um 16:07 schrieb Rowland Penny via samba:
> > On Tue, 2021-08-03 at 15:16 +0200, Matthias Kühne | Ellerhold AG
> > via
> > samba wrote:
> > > Hello Rowland,
> > > 
> > > Im still tracking down this bug and I've set up a brand new VM.
> > > 
> > > Using the standard debian samba package (4.9.5) my script can
> > > successfully send files to a Mac OS SMB-Server without any
> > > smb.conf
> > > at all.
> > > 
> > > After the upgrade to Louis' 4.13 (2:4.13.10+dfsg-0.1buster1) this
> > > script
> > > fails.
> > Any chance of seeing your script ?
> 
> Install dependencies php-cli php-smbclient (which installs
> libsmbclient).
> 
> Run this script:
> 
> ```
> 
> <?php
> 
> // Setup
> if (is_file(__DIR__ . '/_credentials.php')) {
>      $credentials = require __DIR__ . '/_credentials.php';
>      $username  = $credentials['username'];
>      $workgroup = $credentials['workgroup'];
>      $password  = $credentials['password'];
>      $shareUri  = $credentials['shareUri'];
> } else {
>      $username  = 'user';
>      $workgroup = 'WORKGROUP';
>      $password  = 'secret!';
>      $shareUri  = 'smb://my.server.lan/My Share/';
> }
> 
> // Execution
> 
> $state = smbclient_state_new();
> smbclient_option_set($state, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN,
> false);
> 
> if (function_exists('smbclient_client_protocols')) {
>      smbclient_client_protocols($state, 'NT1', null);
>      echo 'Set min protocol' . PHP_EOL;
> }
> 
> echo 'Init with ' . $username . ' on ' . $shareUri . PHP_EOL;
> 
> $result = smbclient_state_init($state, $workgroup, $username,
> $password);
> if (($result === null) || ($result === false)) {
>      throw new RuntimeException('smbclient_state_init() failed: ' . 
> smbclient_state_errno($state));
> }
> 
> // stat()
> var_dump(smbclient_getxattr($state, $shareUri, 'system.dos_attr.*'));
> ```
> 
> It should print the attributes of the share, but fails with 
> "smb_signing_good: BAD SIG: seq 1" and "permission denied"
> 

OK, I installed a new VM and installed php-cli php-smbclient smbclient
I created the script and modified it with my details: username,
workgroup, password and path to a share on another computer

Ran the script and it worked:

root at stand:~# php ./test.php
Init with rowland on smb://devstation.samdom.example.com/Demo/
init succesful
string(122)
"MODE:0x10,SIZE:0,CREATE_TIME:1612199573,ACCESS_TIME:1628102115,WRITE_T
IME:1612199573,CHANGE_TIME:1612199573,INODE:25559042"

Rowland





More information about the samba mailing list