This is a bit long winded but I want to give as much information as I can. I have a Synology NAS running DSM 7.2.2:
steve@NAS:/volume1/docker/backuppc-mdns$ cat /proc/sys/kernel/syno_hw_version DS223j steve@NAS:/volume1/docker/backuppc-mdns$ head -n 5 /etc/VERSION majorversion="7" minorversion="2" major="7" minor="2" micro="2 and I created a backuppc docker on the NAS which works fine my hosts.
I want to backup the files that I used to create the docker.
My NAS is known as nas.local to backuppc and I have a user, steve, on nas.local that has Administrator privilege. I've set up ssh keys and I can ssh from backuppc.local to nas.local as steve. I can use rsync over ssh with this from backuppc:
$ rsync -e "ssh -p 2222" --list-only [email protected]:/volume1/docker/backuppc-mdns/ However I need to run sudo rsync since some of the files are owned by bcakuppc and some be root. This:
$ rsync -e "ssh -p 2222" --rsync-path="sudo /usr/bin/rsync" --list-only [email protected]:/volume1/docker/backuppc-mdns/ ERROR: user has disabled/expired rsync error: wrong password (code 44) at main.c(819) [sender=3.1.2] fails and:
$ sudo journalctl -u sshd -f Sep 01 11:43:43 NAS sshd[30067]: Accepted publickey for steve from 192.168.4.2 port 39428 ssh2: RSA SHA256:3CxLZHnwawsUGT2ctsBknhJNISb/8amFcqEYjWFp03c Sep 01 11:43:43 NAS sshd[30067]: pam_unix(sshd:session): session opened for user steve by (uid=0) Sep 01 11:43:43 NAS sudo[30071]: steve : PWD=/volume1/homes/steve ; USER=root ; COMMAND=/usr/bin/rsync --server --sender -de.LsfxCIvu --list-only . /volume1/docker/backuppc-mdns/ Sep 01 11:43:43 NAS sudo[30071]: pam_unix(sudo:session): session opened for user root by (uid=1026) Sep 01 11:43:43 NAS rsync[30072]: User [admin] now is disabled/expired. Sep 01 11:43:43 NAS rsync[30072]: root has disabled/expired Sep 01 11:43:43 NAS sshd[30067]: pam_unix(sshd:session): session closed for user steve Sep 01 11:43:43 NAS sudo[30071]: pam_unix(sudo:session): session closed for user root User steve is in the sudoers file:
steve@NAS:/volume1/docker/backuppc-mdns$ sudo grep steve /etc/sudoers \# Allow user steve to run rsync with no password steve ALL=(ALL) NOPASSWD: /usr/local/bin/sudo_rsync_wrapper.sh * steve ALL=(ALL) NOPASSWD: /bin/rsync steve ALL=(ALL) NOPASSWD: /usr/bin/rsync So there is something blocking rsync from running as root. Is there a way to get this working? I'm also curious aabout why there are two identical binaries for rsync. One in /bin and one in /usr/bin. Steve