Accounts for services such as a database or a backup job have no reason to open a shell. Setting their shell to nologin makes that official.
The man page describes nologin as a polite way to refuse a login. It shows a message that the account is not available and exits with status 1. It is meant as the shell of an account that should not log in.
sudo usermod -s /usr/sbin/nologin svc-backup
The path differs per distribution, so look it up first:
command -v nologin
A login as svc-backup now prints the refusal. If you want your own text, put it in /etc/nologin.txt, and that file is shown instead of the default message.
The shell field covers only one door. It does not lock the password, and it does not remove any SSH keys the account has. Treat it as one layer, and lock the password and delete keys you no longer need as well.
The man page also says nologin ignores the shell options such as -c. A job that runs su -c as that account will therefore fail. For that case, run the command from a normal admin account with sudo -u svc-backup and the command, which does not depend on the target’s shell.
Further reading: nologin(8)