Re: smbclient

2020-04-21 Thread Jon LaBadie
On Tue, Apr 21, 2020 at 01:06:13PM +0100, Nuno Dias wrote:
>  Hi,
> 
>  I tried everything, I'm using the Administrator user in windows 10, I
> check and he has the rights to do everything, nevertheless in smbclient
> I have several ERRORS saying "NT_STATUS_ACCESS_DENIED listing" this is
> system files or system directories.
> 
>  The backup I want to do is the users directories, and I can read that
> directories and files, it seems amanda fails because of the previous
> ERRORS.
> 
>  Even if I put something like this //pcwindows/c$/Users/user/files and
> I'm positive that I can read these dir and files, I still have error
> in //pcwindows/c$/Progranas
> NT_STATUS_ACCESS_DENIED listing \Programas\*
> 
>  And this is not in the PATH of the backup :(

Putting on my "way back hat".  I recall problems backing up
Windows due to it refusal to allow multiple processes to
access the same file simultaneously.  The work-around that
M$ introduced was called, I think, Volume Shadow Copy (VSC?).

The Zmanda windows client (again I think) uses VSC to
overcome this deficiency in M$ file systems.

Might smbclient be bumping up against this M$ limitation?

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


Re: smbclient

2020-04-21 Thread Nathan Stratton Treadway
On Tue, Apr 21, 2020 at 13:06:13 +0100, Nuno Dias wrote:
>  I tried everything, I'm using the Administrator user in windows 10, I
> check and he has the rights to do everything, nevertheless in smbclient
> I have several ERRORS saying "NT_STATUS_ACCESS_DENIED listing" this is
> system files or system directories.
> 
>  The backup I want to do is the users directories, and I can read that
> directories and files, it seems amanda fails because of the previous
> ERRORS.
> 
>  Even if I put something like this //pcwindows/c$/Users/user/files and
> I'm positive that I can read these dir and files, I still have error
> in //pcwindows/c$/Progranas
> NT_STATUS_ACCESS_DENIED listing \Programas\*
> 
>  And this is not in the PATH of the backup :(

Yeah, that does seem wierd :(

It may be that the estimate phase inadvertently tries to access files
that are outside the specified directory tree, or something.  (In my
case we are only backing up "data file" shares on the Windows PC, so the
system directories are not included anywhere on the shares in question.)

Windows clients are definitely not my strong point, but if you want you
could go ahead and send me (off-list) the Amsamba.*debug file that
corresponds to the failed estimate (and probably your amanda.conf and
disklist files too) and I can see if I can determine anything by
comparing that with the logs from my working system

The other thing that just occurred to me is that if it seems like its
the estimate phase that is failing, you could trying adding "estimate
server" to the amsamba dumptype to see if that at least allows Amanda to
proceed to the dumping phase.


Nathan


Nathan Stratton Treadway  -  natha...@ontko.com  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239


Re: smbclient

2020-04-21 Thread Nuno Dias
 Hi,

 I tried everything, I'm using the Administrator user in windows 10, I
check and he has the rights to do everything, nevertheless in smbclient
I have several ERRORS saying "NT_STATUS_ACCESS_DENIED listing" this is
system files or system directories.

 The backup I want to do is the users directories, and I can read that
directories and files, it seems amanda fails because of the previous
ERRORS.

 Even if I put something like this //pcwindows/c$/Users/user/files and
I'm positive that I can read these dir and files, I still have error
in //pcwindows/c$/Progranas
NT_STATUS_ACCESS_DENIED listing \Programas\*

 And this is not in the PATH of the backup :(

Cheers,
Nuno

On Mon, 2020-04-20 at 18:05 -0400, Nathan Stratton Treadway wrote:
> On Sat, Apr 18, 2020 at 11:44:18 +0100, Nuno Dias wrote:
> >  Hi,
> > 
> >  The OS is Fedora 30 with  amanda-3.5.1-19.fc30.x86_64 and samba-
> > client-4.10.14-0.fc30.x86_64 (this are the packages from the OS).
> > 
> >  The error that I have is accessing some files,
> > 
> > ERROR smbclient: NT_STATUS_ACCESS_DENIED listing
> > Windows\\System32\\config\\systemprofile\\AppData\\Local\\Microsoft
> > \\Wi
> > ndows\\INetCache\\Content.IE5\\*"
> > 
> >  Can this be the reason all the estimates fails?
> 
> Yes, it could be (though I would expect to see a more explict failure
> message from the estimate phase later on in the log file if that were
> the case).
> 
> You will certainly need to connect to your Windows client using a
> username which has sufficient permissions to read all files, and also
> to
> update the "archive bit" on the backed-up files so that level 1 dumps
> work as expected.
> 
> I haven't delived into the nuances of NTFS permissions and have only
> gone through this on a single windows client machine, but in my
> experimentation I found that setting the following permissions using
> Server Manager for the particular shares in question produced a
> working
> level-1 backup with no error messages in the log, while also at least
> preventing obvious editing of the share by the backup user :
>   permissions (for the smbclient user) enabled: 
>  "Read & exectue", 
>  "List folder contents",
> "Read"
> 
>   Advanced Attributes enabled: 
>  "Traverse folder/execute file",
>  "List folder/read data", 
>  "Read attributes", 
>  "Read extended attributes", 
>  "Read permissions" 
>  "Write attributes"
> 
> (On this particular client box, then Sharing tab already had "Full
> Control" granted to Everyone, so I did not have to fine-tune the
> settings there to get Amanda working.)
> 
> Hope that is at least somewhat helpful...
> 
> 
>   Nathan
> 
> ---
> -
> Nathan Stratton Treadway  -  natha...@ontko.com  -  Mid-Atlantic
> region
> Ray Ontko & Co.  -  Software consulting services  -   
> http://www.ontko.com/
>  GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID:
> 1023D/ECFB6239
>  Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239
-- 
Nuno Dias 
LIP



Re: smbclient

2020-04-21 Thread Nuno Dias
 Hi Diego,

 Unfortunately your patch didn't solve my problem.
 But thanks for replying.

Cheers,
Nuno

On Tue, 2020-04-21 at 08:01 +0200, Diego Zuccato wrote:
> Il 17/04/20 20:51, Nuno Dias ha scritto:
> 
> >  I'm trying to use the amsamba plugin, put fails everytime in the
> > estimate.
> Probably unrelated, but...
> 
> >  A search in google got me some results saying that some time ago
> > the
> > samba version 4.x was incompatible with amanda, anyone knows if
> > this is
> > still true?
> I have had to apply this patch:
> 
> root@nas1:/usr/lib/amanda/application# diff -u amsamba.ori amsamba
> --- amsamba.ori   2019-07-16 09:09:28.430585521 +0200
> +++ amsamba   2019-07-18 10:44:37.257853728 +0200
> @@ -462,6 +462,7 @@
>   debug("stderr: " . $_);
>   next if /^Domain=/;
>   next if /^WARNING/g;
> + next if /^Unable to initialize messaging context/;
>   # message if samba server is configured with 'security = share'
>   next if /Server not using user level security and no password
> supplied./;
>   $self->print_to_server("smbclient: $_",
> @@ -554,6 +555,7 @@
>   next if /^Domain=/;
>   next if /dumped \d+ files and directories/;
>   next if /^WARNING/g;
> + next if /^Unable to initialize messaging context/;
>   # message if samba server is configured with 'security = share'
>   next if /Server not using user level security and no password
> supplied./;
>   debug("stderr: $_");
> @@ -758,6 +760,7 @@
>   return if $line =~ /tarmode is now /;
>   return if $line =~ /tar_re_search set/;
>   return if $line =~ /WARNING/g;
> + return if $line =~ /^Unable to initialize messaging context/;
>   if ($line =~ /dumped (\d+) files and directories/) {
>   $nb_files = $1;
>   return;
> 
-- 
Nuno Dias 
LIP