You are not logged in.

#1 2021-03-02 08:58:19

mugnipper
Member
Registered: 2017-09-08
Posts: 14

smbclient exclude $RECYCLE.BIN

Hi,

I am using smbclient to backup some windows network shares, but I came across the problem that the exclude list is not working anymore for $RECYCLE.BIN.

I don't know if it is because of some updates I installed on the windows side or on the linux side. It is roughly for about 2 months now, I am using this command:

/usr/bin/smbclient \\\\WindowsServer\\SHARE -U INTRANET\\Username -E -d 1 -c tarmode\ full -TcX test.tar System\ Volume\ Information $RECYCLE.BIN

It is excluding System Volume Information but not $RECYCLE.BIN, and I am getting errors about not being able to read that directory (as it shouldn't ).

NT_STATUS_ACCESS_DENIED listing \$RECYCLE.BIN\S-1-5-21-1271007128-3907751106-2734622434-1102\*

I tried various combinations like \$RECYCLE.BIN \\$RECYCLE.BIN $RECYCLE\.BIN ...

I search quite a lot but not being able to figure out how to exclude the folder $RECYCLE.BIN

Thanks!

Offline

#2 2021-03-06 01:29:06

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: smbclient exclude $RECYCLE.BIN

'$RECYCLE.BIN' perhaps?

Offline

#3 2021-03-06 01:53:03

Maniaxx
Member
Registered: 2014-05-14
Posts: 757

Re: smbclient exclude $RECYCLE.BIN

Or this:

\$RECYCLE.BIN

Edit: Sry, i missed you already tried that...

Last edited by Maniaxx (2021-03-06 02:00:33)


sys2064

Offline

#4 2021-03-06 03:04:24

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: smbclient exclude $RECYCLE.BIN

In addition, Windows claims all bins are called '$Recycle.Bin'. Are you sure it's all caps? While Windows doesn't care about case, Linux does.

Offline

#5 2021-03-06 12:11:08

mugnipper
Member
Registered: 2017-09-08
Posts: 14

Re: smbclient exclude $RECYCLE.BIN

I also tried with $Recycle.Bin, no difference, and smbclient shows it as $RECYCLE.BIN:

# /usr/bin/smbclient \\\\server-kuhnle\\kuhnle -U INTRANET\\svcbackuppc -E -d 1
Enter INTRANET\svcbackuppc's password:
Try "help" to get a list of possible commands.
smb: \> ls
  $RECYCLE.BIN                      DHS        0  Tue Jan 21 10:22:05 2020
  .windows-serial                    AH        2  Mon Sep 19 12:30:19 2011
  A                                   D        0  Fri Mar  5 09:47:52 2021
  Adressen                            D        0  Thu Mar  4 09:50:53 2021
  ARCHIVA                             D        0  Mon Nov 30 09:26:24 2020
  ARCHIVKA                            D        0  Thu Jun 29 16:45:42 2017
  BDE                                 D        0  Thu Jun 29 16:45:45 2017

Offline

#6 2021-03-06 13:45:21

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: smbclient exclude $RECYCLE.BIN

What about the one I told you with the single quotes?

<single quote>$RECYCLE.BIN<single quote>

???

Offline

#7 2021-03-06 14:09:05

mugnipper
Member
Registered: 2017-09-08
Posts: 14

Re: smbclient exclude $RECYCLE.BIN

No difference

# /usr/bin/smbclient \\\\server-kuhnle\\kuhnle -U INTRANET\\svcbackuppc -E -d 1 -c tarmode\ nohidden\ nosystem -TcX test.tar '$RECYCLE.BIN'
Enter INTRANET\svcbackuppc's password:
tarmode is now full, nosystem, nohidden, noreset, noverbose
NT_STATUS_ACCESS_DENIED opening remote file \System Volume Information\WPSettings.dat
NT_STATUS_ACCESS_DENIED listing \$RECYCLE.BIN\S-1-5-21-1271007128-3907751106-2734622434-1102\*
NT_STATUS_ACCESS_DENIED listing \$RECYCLE.BIN\S-1-5-21-1271007128-3907751106-2734622434-1106\*

For excluding System Volume Information /usr/bin/smbclient \\\\server-kuhnle\\kuhnle -U INTRANET\\svcbackuppc -E -d 1 -c tarmode\ nohidden\ nosystem -TcX test.tar System\ Volume\ Information works.

Offline

#8 2021-03-06 14:18:07

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: smbclient exclude $RECYCLE.BIN

This also settles that it's not a positional problem.

Have you tried Globbing? '*RECYCLE.BIN'?

Last edited by Awebb (2021-03-06 14:18:42)

Offline

#9 2021-03-06 14:29:20

mugnipper
Member
Registered: 2017-09-08
Posts: 14

Re: smbclient exclude $RECYCLE.BIN

Yeah this does not work either, also '*RECYCLE*'  does no work

Offline

#10 2021-03-06 16:05:26

Maniaxx
Member
Registered: 2014-05-14
Posts: 757

Re: smbclient exclude $RECYCLE.BIN

Maybe capture the traffic to make out differences between your string and the remote one.
Otherwise i would ask at samba mailing list directly.


sys2064

Offline

#11 2021-03-07 11:33:17

mugnipper
Member
Registered: 2017-09-08
Posts: 14

Re: smbclient exclude $RECYCLE.BIN

Ok thanks, for now I helped myself by including everything I want except Recyclebin and System Volume Information, which is ugly but it works.

Offline

#12 2021-03-07 14:16:41

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: smbclient exclude $RECYCLE.BIN

The trashbin has won :-(

Offline

#13 2021-03-07 17:58:59

mugnipper
Member
Registered: 2017-09-08
Posts: 14

Re: smbclient exclude $RECYCLE.BIN

Unfortunately yes, I am not really keen on using a mailing list(never quite understood how this works) nor capturing traffic and fiddling around until I find out which strings I need to compare.
And as it looks like these two shares will be replaced by Samba Shares in about an year.

Offline

Board footer

Powered by FluxBB