On Tue, 2021-08-17 at 13:44 +0200, Matthias K?hne | Ellerhold AG
wrote:>
> Am 04.08.21 um 20:51 schrieb Rowland Penny via samba:
> > 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
>
> Hello Rowland,
>
> is the server "devstation.samdom.example.com" a Mac OS 10.6
server
> with
> an SMB (1) share?
No and you really shouldn't still be using SMBv1>
> I guess there are some differences between Mac OS SMB1 and Samba
> SMB1?
This is known, so it looks like your problem isn't a Samba one, it a
Mac one.
Rowland