Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrbk doesn't append a command with "sudo -n" if ssh is used and backend_local_user=btrfs-progs-sudo #592

Open
JorisBlom opened this issue Jul 16, 2024 · 0 comments

Comments

@JorisBlom
Copy link

JorisBlom commented Jul 16, 2024

I added the commands btrfs, readlink, and test to the sudoers file on both systems to make btrbk without sudo possible. My btrbk.conf file is:

backend_local_user         btrfs-progs-sudo
ssh_user                   anna

volume ssh://154.186.17.112:22/
snapshot_dir home/user/.snapshots
target       /mnt/backup
subvolume    home/user

When I run btrbk run -v -progress --dry-run I get the following warnings:

WARNING: Skipping subvolume "154.186.17.112[22]:/home/user": Failed to fetch subvolume detail
WARNING: ... Command execution failed (exitcode=1)
WARNING: ... sh: ssh -p 22 [email protected] 'btrfs subvolume list -a -c -u -q -R '\''/home/user'\'''
WARNING: ... can't perform the search: Operation not permitted

The warning states that ssh -p 22 [email protected] 'btrfs subvolume list -a -c -u -q -R '\''/home/user'\''' is the command the program is trying to execute. The btrfs command is not appended with sudo -n like the documentation states (backend_local_user=btrfs-progs-sudo). ssh -p 22 [email protected] 'sudo -n btrfs subvolume list -a -c -u -q -R '\''/home/user'\''' would run just fine (with sudo -n added). This seems like a bug to me.

If I change ssh_user to root, the program will run fine too, but my goal is to disable root logins for ssh. Is there any way to achieve this?

@JorisBlom JorisBlom changed the title btrbk doesn't append a command with "sudo -n" if ssh is enabled and backend_local_user=btrfs-progs-sudo btrbk doesn't append a command with "sudo -n" if ssh is used and backend_local_user=btrfs-progs-sudo Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant