2020-04-06 18:13:10 +03:00
|
|
|
#!/bin/bash
|
|
|
|
#set debconf krb5 and samba-common
|
|
|
|
|
|
|
|
ad_domain_name=$1
|
|
|
|
ad_host_name=$2
|
|
|
|
|
|
|
|
echo "samba-common samba-common/workgroup string WORKGROUP" | sudo debconf-set-selections
|
|
|
|
echo "samba-common samba-common/dhcp boolean false" | sudo debconf-set-selections
|
|
|
|
echo "samba-common samba-common/do_debconf boolean true" | sudo debconf-set-selections
|
2020-10-27 14:40:52 +03:00
|
|
|
#apt-get -y install samba-common
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" samba-common
|
2020-04-06 18:13:10 +03:00
|
|
|
|
|
|
|
cat > /root/debconf-krb5.conf <<EOF
|
|
|
|
|
|
|
|
krb5-config krb5-config/read_conf boolean true
|
|
|
|
krb5-config krb5-config/kerberos_servers string
|
|
|
|
krb5-config krb5-config/add_servers boolean false
|
|
|
|
krb5-config krb5-config/default_realm string ${ad_domain_name}
|
|
|
|
krb5-config krb5-config/add_servers_realm string ${ad_host_name}
|
|
|
|
krb5-config krb5-config/admin_server string ${ad_host_name}
|
|
|
|
EOF
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
cat /root/debconf-krb5.conf | debconf-set-selections
|
|
|
|
apt-get install krb5-user -y
|
|
|
|
|
|
|
|
|