22

So, when running:

sudo apt-get install krb5-user

You are asked to enter the AD/LDAP domain. The problem is that I want this to be able to be run as a startup script for my machines. Is there any way to either pass the domain in as a parameter or disable the interaction and set up krb5-user after?

Thanks

2 Answers2

31

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

Zlemini
  • 4,827
  • 2
  • 21
  • 23
  • 5
    Ok, running `DEBIAN_FRONTEND=noninteractive apt-get install -y krb5-user` worked. I then had to update /etc/krb5.conf with: `[libdefaults] default_realm = AD.MYDOMAIN.COM` Thanks! –  Oct 01 '16 at 15:16
  • 3
    On Ubuntu 18.04 the accepted solution doesn't work (I recognize that the question is for 16.04). For peeps on 18.04, first update /etc/krb5.conf as described by user6907792, and then apt install krb5-user -y. – rcabr Dec 09 '19 at 20:45
  • 1
    @rcabr that seems to also help with 16.04 from what I can tell – C.Nivs Dec 17 '19 at 18:28
2
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install [packagename]

This worked for me without updating the /etc/krb5.conf on Ubuntu 18.04.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77