We have a lot of file synchronization and backup processes that rely on www-data being able to ssh between servers using SSH keys. This depends on he www-data user having a valid shell. However, during Ubuntu upgrades, the shell of www-data sometimes gets reset to /usr/sbin/nologin, thus breaking backups and file synchronization. We need to do something so that it doesn’t happen again.
Maybe create a separate user with the same uid as www-data? Or with a different uid but with the ability to sudo, and adjust all scripts accordingly, using RSYNC_RSH variable or its equivalent in Unison.