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

restore script does not recreate the restic user #12

Open
matlag opened this issue Jul 25, 2022 · 0 comments
Open

restore script does not recreate the restic user #12

matlag opened this issue Jul 25, 2022 · 0 comments

Comments

@matlag
Copy link

matlag commented Jul 25, 2022

Describe the bug

Restoring the restic app does not recreate the user 'restic', resulting in a failure to execute.

Context

  • Hardware: Kimsufi server
  • YunoHost version: 4.3.6
  • I have access to my server: Through SSH
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no

Steps to reproduce

-Re-install system
-Invoke `yunohost backup restore archive --apps restic
-sudo systemctl start restic

Expected behavior

Should launch a backup, instead hands back prompt

Logs

restic.service: Failed to determine user credentials: No such process
restic.service: Failed at step USER spawning /usr/local/bin/backup-with-restic: No such process

Manual fix

ls -lh /usr/local/bin/backup-with-restic
retrieve UID and GID of file, then:

groupadd -g $GID restic
useradd -u $UID -g restic restic
cat > /tmp/restic_sudoer << EOSUDOER
restic ALL = (root) NOPASSWD: /usr/bin/yunohost*, /bin/journalctl*, /usr/bin/find /etc/yunohost/apps -name backup, /opt/yunohost/restic/check_method_restic
EOSUDOER
visudo -cf /tmp/restic_sudoer && mv /tmp/restic_sudoer /etc/sudoers.d/restic
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