Add backup user

Also provide a way to set the ssh public key for the backup user
This commit is contained in:
Sander Koenders
2026-02-16 19:05:44 +01:00
parent 65fc2dc320
commit 0042f61d04
2 changed files with 59 additions and 5 deletions

View File

@@ -19,6 +19,16 @@ $STD rc-update add sshd
$STD rc-service sshd start
msg_ok "Installed BorgBackup"
msg_info "Creating backup user"
$STD adduser -D -s /bin/bash -h /home/backup backup
$STD passwd -d backup
msg_ok "Created backup user"
msg_info "Configure SSH, disabling password authentication and enabling public key authentication"
$STD sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
$STD rc-service sshd restart
msg_ok "Configured SSH"
motd_ssh
customize
cleanup_lxc