Re: [BackupPC-users] ssh from an account without a shell

2018-02-07 Thread Alexander Kobel

Hi Phil,

are you sure that the correct SSH key is used for the connection?

You mentioned that the command works as root, so I assume that the SSH 
key that you authorized for connecting to the client is root's rather 
than backuppc's.  (Crucial line: "Permission denied 
(publickey,keyboard-interactive).")
If so, either ssh-genkey as backuppc and authorize the corresponding 
pubkey on the client, or copy over root's key to backuppc; typically, 
this should work as root via

cp -i ~root/.ssh/id_?sa* ~backuppc/.ssh/
chown backuppc:backuppc ~/backuppc/.ssh/id_?sa*

Another reason could be that, unless you disabled SSH host key checking, 
you need to manually SSH to the client as user backuppc once to confirm 
the client's key at the prompt.  To check this,

su -s /bin/bash backuppc
ssh ${client_user}@xxx.xxx.xxx.xxx

Note the ${client_user} - I guess that would be root, so it works 
without any specification when you run SSH as root, but not as backuppc. 
 You might want to add a corresponding UserName entry in your backuppc 
user's SSH config file.



HTH,
Alex


On 02/07/2018 04:10 PM, Philip Parsons (Velindre - Medical Physics) wrote:

Hi Robert,

Thanks for that.

I’ve just tried it and (I should have already guessed this!), it gave 
the same error message as BackupPC reported J


Any ideas what I may be doing wrong?

Thanks,

Phil

*From:*Robert Trevellyan [mailto:robert.trevell...@gmail.com]
*Sent:* 07 February 2018 14:33
*To:* General list for user discussion, questions and support 
<backuppc-users@lists.sourceforge.net>

*Subject:* Re: [BackupPC-users] ssh from an account without a shell

To run a shell as the backuppc user, do something like this:
su -s /bin/bash backuppc


Robert Trevellyan

On Wed, Feb 7, 2018 at 8:22 AM, Philip Parsons (Velindre - Medical 
Physics) <philip.pars...@wales.nhs.uk 
<mailto:philip.pars...@wales.nhs.uk>> wrote:


Hi all,

I’ve tried looking in a couple of places, but I can’t find the
answer to this.

I have essentially used this webpage to install and configure
backuppc 4.1.5 on Ubuntu 16.04 LTS -

https://github.com/backuppc/backuppc/wiki/Installing-BackupPC-4-from-git-on-Ubuntu-Xenial-16.04-LTS

I then tried to create an rsync backup to a SUSE server using
https://www.howtoforge.com/linux_backuppc_p4  and various other sources.

When I try to run the backup it fails with ‘No files dumped for
share /data/rtgrid/’

When I run the line from the XferLOG:

/usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc
--bpc-host-name rtgridserver --bpc-share-name /data/rtgrid/
--bpc-bkup-num 0 --bpc-bkup-comp 3 --bpc-bkup-prevnum -1
--bpc-bkup-prevcomp -1 --bpc-bkup-inode0 2 --bpc-attrib-new
--bpc-log-level 1 -e /usr/bin/ssh\ -l\ root
--rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive
--protect-args --numeric-ids --perms --owner --group -D --times
--links --hard-links --delete --delete-excluded --one-file-system
--partial --log-format=log:\ %o\ %i\ %B\ %8U,%8G\ %9l\ %f%L --stats
--checksum --timeout=72000 --exclude=var/experiment
--exclude=junkdrawer --exclude=scratchpad --exclude=tmp
xxx.xxx.xxx.xxx:/data/rtgrid/

As root, it runs.

However, I get the error message (tagged at the bottom for
readability) when backuppc runs the job.  I’m probably making things
more confusing than they should be, but I think the install webpage
creates a shell-less service backuppc user.  I then can’t su to
backuppc to run the line to test it.

Has anyone else used this kind of account on backuppc?  Can anyone
suggest a fix for this?

Thanks in advance,

Philip Parsons

Contents of file /data/backuppc/pc/rtgridserver/XferLOG.bad.z,
modified 2018-02-07 06:00:06

XferLOG file /data/backuppc/pc/rtgridserver/XferLOG.0.z created
2018-02-07 06:00:00

Backup prep: type = full, case = 1, inPlace = 1, doDuplicate = 0,
newBkupNum = 0, newBkupIdx = 0, lastBkupNum = , lastBkupIdx = 
(FillCycle = 0, noFillCnt = )


Running: /usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc
--bpc-host-name rtgridserver --bpc-share-name /data/rtgrid/
--bpc-bkup-num 0 --bpc-bkup-comp 3 --bpc-bkup-prevnum -1
--bpc-bkup-prevcomp -1 --bpc-bkup-inode0 2 --bpc-attrib-new
--bpc-log-level 1 -e /usr/bin/ssh\ -l\ root
--rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive
--protect-args --numeric-ids --perms --owner --group -D --times
--links --hard-links --delete --delete-excluded --one-file-system
--partial --log-format=log:\ %o\ %i\ %B\ %8U,%8G\ %9l\ %f%L --stats
--checksum --timeout=72000 --exclude=var/experiment
--exclude=junkdrawer --exclude=scratchpad --exclude=tmp
xxx.xxx.xxx.xxx:/data/rtgrid/ /

full backup started for directory /data/rtgrid/

Xfer PIDs are now 111286

This is the rsync child about to exec /usr/local/bin/rsyn

Re: [BackupPC-users] ssh from an account without a shell

2018-02-07 Thread Philip Parsons (Velindre - Medical Physics)
Hi Robert,

Thanks for that.

I’ve just tried it and (I should have already guessed this!), it gave the same 
error message as BackupPC reported ☺

Any ideas what I may be doing wrong?

Thanks,
Phil

From: Robert Trevellyan [mailto:robert.trevell...@gmail.com]
Sent: 07 February 2018 14:33
To: General list for user discussion, questions and support 
<backuppc-users@lists.sourceforge.net>
Subject: Re: [BackupPC-users] ssh from an account without a shell

To run a shell as the backuppc user, do something like this:
su -s /bin/bash backuppc

Robert Trevellyan

On Wed, Feb 7, 2018 at 8:22 AM, Philip Parsons (Velindre - Medical Physics) 
<philip.pars...@wales.nhs.uk<mailto:philip.pars...@wales.nhs.uk>> wrote:
Hi all,

I’ve tried looking in a couple of places, but I can’t find the answer to this.

I have essentially used this webpage to install and configure backuppc 4.1.5 on 
Ubuntu 16.04 LTS - 
https://github.com/backuppc/backuppc/wiki/Installing-BackupPC-4-from-git-on-Ubuntu-Xenial-16.04-LTS

I then tried to create an rsync backup to a SUSE server using 
https://www.howtoforge.com/linux_backuppc_p4  and various other sources.

When I try to run the backup it fails with ‘No files dumped for share 
/data/rtgrid/’

When I run the line from the XferLOG:
/usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc --bpc-host-name 
rtgridserver --bpc-share-name /data/rtgrid/ --bpc-bkup-num 0 --bpc-bkup-comp 3 
--bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1 --bpc-bkup-inode0 2 
--bpc-attrib-new --bpc-log-level 1 -e /usr/bin/ssh\ -l\ root 
--rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive --protect-args 
--numeric-ids --perms --owner --group -D --times --links --hard-links --delete 
--delete-excluded --one-file-system --partial --log-format=log:\ %o\ %i\ %B\ 
%8U,%8G\ %9l\ %f%L --stats --checksum --timeout=72000 --exclude=var/experiment 
--exclude=junkdrawer --exclude=scratchpad --exclude=tmp 
xxx.xxx.xxx.xxx:/data/rtgrid/

As root, it runs.

However, I get the error message (tagged at the bottom for readability) when 
backuppc runs the job.  I’m probably making things more confusing than they 
should be, but I think the install webpage creates a shell-less service 
backuppc user.  I then can’t su to backuppc to run the line to test it.

Has anyone else used this kind of account on backuppc?  Can anyone suggest a 
fix for this?

Thanks in advance,
Philip Parsons




Contents of file /data/backuppc/pc/rtgridserver/XferLOG.bad.z, modified 
2018-02-07 06:00:06

XferLOG file /data/backuppc/pc/rtgridserver/XferLOG.0.z created 2018-02-07 
06:00:00

Backup prep: type = full, case = 1, inPlace = 1, doDuplicate = 0, newBkupNum = 
0, newBkupIdx = 0, lastBkupNum = , lastBkupIdx =  (FillCycle = 0, noFillCnt = )

Running: /usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc --bpc-host-name 
rtgridserver --bpc-share-name /data/rtgrid/ --bpc-bkup-num 0 --bpc-bkup-comp 3 
--bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1 --bpc-bkup-inode0 2 
--bpc-attrib-new --bpc-log-level 1 -e /usr/bin/ssh\ -l\ root 
--rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive --protect-args 
--numeric-ids --perms --owner --group -D --times --links --hard-links --delete 
--delete-excluded --one-file-system --partial --log-format=log:\ %o\ %i\ %B\ 
%8U,%8G\ %9l\ %f%L --stats --checksum --timeout=72000 --exclude=var/experiment 
--exclude=junkdrawer --exclude=scratchpad --exclude=tmp 
xxx.xxx.xxx.xxx:/data/rtgrid/ /

full backup started for directory /data/rtgrid/

Xfer PIDs are now 111286

This is the rsync child about to exec /usr/local/bin/rsync_bpc

Permission denied (publickey,keyboard-interactive).

rsync_bpc: connection unexpectedly closed (0 bytes received so far) [Receiver]

Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 
sizeTotal, 0 filesNew, 0 sizeNew, 0 sizeNewComp, 2 inode

rsync error: unexplained error (code 255) at io.c(629) [Receiver=3.0.9.11]

rsync_bpc exited with fatal status 255 (65280) (rsync error: unexplained error 
(code 255) at io.c(629) [Receiver=3.0.9.11])

Xfer PIDs are now

Got fatal error during xfer (No files dumped for share /data/rtgrid/)

Backup aborted (No files dumped for share /data/rtgrid/)

BackupFailCleanup: nFilesTotal = 0, type = full, BackupCase = 1, inPlace = 1, 
lastBkupNum =

Removing empty backup #0

Xfer PIDs are now 111317

BackupPC_backupDelete: removing #0

BackupPC_backupDelete: No prior backup for merge

Xfer PIDs are now 111317,111318

BackupPC_refCountUpdate: host rtgridserver got 0 errors (took 0 secs)

Xfer PIDs are now 111317

Xfer PIDs are now

Finished BackupPC_backupDelete, status = 0 (running time: 0 sec)

Xfer PIDs are now

Running BackupPC_refCountUpdate -h rtgridserver -f on rtgridserver

Xfer PIDs are now 111319

BackupPC_refCountUpdate: host rtgridserver got 0 errors (took 0 secs)

Xfer PIDs are now

Finished BackupPC_refCountUpdate (running time: 0 sec)

Re: [BackupPC-users] ssh from an account without a shell

2018-02-07 Thread Robert Trevellyan
To run a shell as the backuppc user, do something like this:
su -s /bin/bash backuppc

Robert Trevellyan

On Wed, Feb 7, 2018 at 8:22 AM, Philip Parsons (Velindre - Medical Physics)
 wrote:

> Hi all,
>
>
>
> I’ve tried looking in a couple of places, but I can’t find the answer to
> this.
>
>
>
> I have essentially used this webpage to install and configure backuppc
> 4.1.5 on Ubuntu 16.04 LTS - https://github.com/backuppc/
> backuppc/wiki/Installing-BackupPC-4-from-git-on-Ubuntu-Xenial-16.04-LTS
>
>
>
> I then tried to create an rsync backup to a SUSE server using
> https://www.howtoforge.com/linux_backuppc_p4  and various other sources.
>
>
>
> When I try to run the backup it fails with ‘No files dumped for share
> /data/rtgrid/’
>
>
>
> When I run the line from the XferLOG:
>
> /usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc --bpc-host-name
> rtgridserver --bpc-share-name /data/rtgrid/ --bpc-bkup-num 0
> --bpc-bkup-comp 3 --bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1
> --bpc-bkup-inode0 2 --bpc-attrib-new --bpc-log-level 1 -e /usr/bin/ssh\ -l\
> root --rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive
> --protect-args --numeric-ids --perms --owner --group -D --times --links
> --hard-links --delete --delete-excluded --one-file-system --partial
> --log-format=log:\ %o\ %i\ %B\ %8U,%8G\ %9l\ %f%L --stats --checksum
> --timeout=72000 --exclude=var/experiment --exclude=junkdrawer
> --exclude=scratchpad --exclude=tmp xxx.xxx.xxx.xxx:/data/rtgrid/
>
>
>
> As root, it runs.
>
>
>
> However, I get the error message (tagged at the bottom for readability)
> when backuppc runs the job.  I’m probably making things more confusing than
> they should be, but I think the install webpage creates a shell-less
> service backuppc user.  I then can’t su to backuppc to run the line to test
> it.
>
>
>
> Has anyone else used this kind of account on backuppc?  Can anyone suggest
> a fix for this?
>
>
>
> Thanks in advance,
>
> Philip Parsons
>
>
>
>
>
>
>
> Contents of file /data/backuppc/pc/rtgridserver/XferLOG.bad.z, modified
> 2018-02-07 06:00:06
>
> XferLOG file /data/backuppc/pc/rtgridserver/XferLOG.0.z created 2018-02-07 
> 06:00:00
>
> Backup prep: type = full, case = 1, inPlace = 1, doDuplicate = 0, newBkupNum 
> = 0, newBkupIdx = 0, lastBkupNum = , lastBkupIdx =  (FillCycle = 0, noFillCnt 
> = )
>
> Running: /usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc 
> --bpc-host-name rtgridserver --bpc-share-name /data/rtgrid/ --bpc-bkup-num 0 
> --bpc-bkup-comp 3 --bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1 
> --bpc-bkup-inode0 2 --bpc-attrib-new --bpc-log-level 1 -e /usr/bin/ssh\ -l\ 
> root --rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive 
> --protect-args --numeric-ids --perms --owner --group -D --times --links 
> --hard-links --delete --delete-excluded --one-file-system --partial 
> --log-format=log:\ %o\ %i\ %B\ %8U,%8G\ %9l\ %f%L --stats --checksum 
> --timeout=72000 --exclude=var/experiment --exclude=junkdrawer 
> --exclude=scratchpad --exclude=tmp xxx.xxx.xxx.xxx:/data/rtgrid/ /
>
> full backup started for directory /data/rtgrid/
>
> Xfer PIDs are now 111286
>
> This is the rsync child about to exec /usr/local/bin/rsync_bpc
>
> Permission denied (publickey,keyboard-interactive).
>
> rsync_bpc: connection unexpectedly closed (0 bytes received so far) [Receiver]
>
> Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 
> sizeTotal, 0 filesNew, 0 sizeNew, 0 sizeNewComp, 2 inode
>
> rsync error: unexplained error (code 255) at io.c(629) [Receiver=3.0.9.11]
>
> rsync_bpc exited with fatal status 255 (65280) (rsync error: unexplained 
> error (code 255) at io.c(629) [Receiver=3.0.9.11])
>
> Xfer PIDs are now
>
> Got fatal error during xfer (No files dumped for share /data/rtgrid/)
>
> Backup aborted (No files dumped for share /data/rtgrid/)
>
> BackupFailCleanup: nFilesTotal = 0, type = full, BackupCase = 1, inPlace = 1, 
> lastBkupNum =
>
> Removing empty backup #0
>
> Xfer PIDs are now 111317
>
> BackupPC_backupDelete: removing #0
>
> BackupPC_backupDelete: No prior backup for merge
>
> Xfer PIDs are now 111317,111318
>
> BackupPC_refCountUpdate: host rtgridserver got 0 errors (took 0 secs)
>
> Xfer PIDs are now 111317
>
> Xfer PIDs are now
>
> Finished BackupPC_backupDelete, status = 0 (running time: 0 sec)
>
> Xfer PIDs are now
>
> Running BackupPC_refCountUpdate -h rtgridserver -f on rtgridserver
>
> Xfer PIDs are now 111319
>
> BackupPC_refCountUpdate: host rtgridserver got 0 errors (took 0 secs)
>
> Xfer PIDs are now
>
> Finished BackupPC_refCountUpdate (running time: 0 sec)
>
> Xfer PIDs are now
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> 

[BackupPC-users] ssh from an account without a shell

2018-02-07 Thread Philip Parsons (Velindre - Medical Physics)
Hi all,

I've tried looking in a couple of places, but I can't find the answer to this.

I have essentially used this webpage to install and configure backuppc 4.1.5 on 
Ubuntu 16.04 LTS - 
https://github.com/backuppc/backuppc/wiki/Installing-BackupPC-4-from-git-on-Ubuntu-Xenial-16.04-LTS

I then tried to create an rsync backup to a SUSE server using 
https://www.howtoforge.com/linux_backuppc_p4  and various other sources.

When I try to run the backup it fails with 'No files dumped for share 
/data/rtgrid/'

When I run the line from the XferLOG:
/usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc --bpc-host-name 
rtgridserver --bpc-share-name /data/rtgrid/ --bpc-bkup-num 0 --bpc-bkup-comp 3 
--bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1 --bpc-bkup-inode0 2 
--bpc-attrib-new --bpc-log-level 1 -e /usr/bin/ssh\ -l\ root 
--rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive --protect-args 
--numeric-ids --perms --owner --group -D --times --links --hard-links --delete 
--delete-excluded --one-file-system --partial --log-format=log:\ %o\ %i\ %B\ 
%8U,%8G\ %9l\ %f%L --stats --checksum --timeout=72000 --exclude=var/experiment 
--exclude=junkdrawer --exclude=scratchpad --exclude=tmp 
xxx.xxx.xxx.xxx:/data/rtgrid/

As root, it runs.

However, I get the error message (tagged at the bottom for readability) when 
backuppc runs the job.  I'm probably making things more confusing than they 
should be, but I think the install webpage creates a shell-less service 
backuppc user.  I then can't su to backuppc to run the line to test it.

Has anyone else used this kind of account on backuppc?  Can anyone suggest a 
fix for this?

Thanks in advance,
Philip Parsons




Contents of file /data/backuppc/pc/rtgridserver/XferLOG.bad.z, modified 
2018-02-07 06:00:06

XferLOG file /data/backuppc/pc/rtgridserver/XferLOG.0.z created 2018-02-07 
06:00:00

Backup prep: type = full, case = 1, inPlace = 1, doDuplicate = 0, newBkupNum = 
0, newBkupIdx = 0, lastBkupNum = , lastBkupIdx =  (FillCycle = 0, noFillCnt = )

Running: /usr/local/bin/rsync_bpc --bpc-top-dir /data/backuppc --bpc-host-name 
rtgridserver --bpc-share-name /data/rtgrid/ --bpc-bkup-num 0 --bpc-bkup-comp 3 
--bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1 --bpc-bkup-inode0 2 
--bpc-attrib-new --bpc-log-level 1 -e /usr/bin/ssh\ -l\ root 
--rsync-path=/usr/bin/sudo\ /usr/bin/rsync --super --recursive --protect-args 
--numeric-ids --perms --owner --group -D --times --links --hard-links --delete 
--delete-excluded --one-file-system --partial --log-format=log:\ %o\ %i\ %B\ 
%8U,%8G\ %9l\ %f%L --stats --checksum --timeout=72000 --exclude=var/experiment 
--exclude=junkdrawer --exclude=scratchpad --exclude=tmp 
xxx.xxx.xxx.xxx:/data/rtgrid/ /

full backup started for directory /data/rtgrid/

Xfer PIDs are now 111286

This is the rsync child about to exec /usr/local/bin/rsync_bpc

Permission denied (publickey,keyboard-interactive).

rsync_bpc: connection unexpectedly closed (0 bytes received so far) [Receiver]

Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 
sizeTotal, 0 filesNew, 0 sizeNew, 0 sizeNewComp, 2 inode

rsync error: unexplained error (code 255) at io.c(629) [Receiver=3.0.9.11]

rsync_bpc exited with fatal status 255 (65280) (rsync error: unexplained error 
(code 255) at io.c(629) [Receiver=3.0.9.11])

Xfer PIDs are now

Got fatal error during xfer (No files dumped for share /data/rtgrid/)

Backup aborted (No files dumped for share /data/rtgrid/)

BackupFailCleanup: nFilesTotal = 0, type = full, BackupCase = 1, inPlace = 1, 
lastBkupNum =

Removing empty backup #0

Xfer PIDs are now 111317

BackupPC_backupDelete: removing #0

BackupPC_backupDelete: No prior backup for merge

Xfer PIDs are now 111317,111318

BackupPC_refCountUpdate: host rtgridserver got 0 errors (took 0 secs)

Xfer PIDs are now 111317

Xfer PIDs are now

Finished BackupPC_backupDelete, status = 0 (running time: 0 sec)

Xfer PIDs are now

Running BackupPC_refCountUpdate -h rtgridserver -f on rtgridserver

Xfer PIDs are now 111319

BackupPC_refCountUpdate: host rtgridserver got 0 errors (took 0 secs)

Xfer PIDs are now

Finished BackupPC_refCountUpdate (running time: 0 sec)

Xfer PIDs are now

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/