Unattended install of krb5-user on Ubuntu 16.04
For an unattended installation try setting DEBIAN_FRONTEND variable to noninteractive with:
export DEBIAN_FRONTEND=noninteractive
And pass the -y flag to apt-get:
apt-get install -y krb5-user
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install [packagename]
This worked for me without updating the /etc/krb5.conf
on Ubuntu 18.04.