#
# The reference version of this script is maintained in:
#   ./kali-installer/simple-cdd/profiles/kali.preseed
#   ./kali-live/kali-config/common/includes.installer/preseed.cfg
#
# Upstream: https://gitlab.com/kalilinux/packages/debian-installer/-/blob/kali/master/build/preseed.cfg
#

# This file replaces preseed.cfg embedded in the initrd by
# debian-installer. It should be kept in sync except with the
# mirror/{codename,suite} dropped so that the image installs
# what's available on the CD instead of hardcoding a specific
# release.

## Questions from debian-installer

# Default repository information (don't include codename data, d-i figures it
# out from what's available in the ISO)
d-i mirror/country string enter information manually
d-i mirror/http/hostname string http.kali.org
d-i mirror/http/directory string /kali

# Disable security, updates and backports
d-i apt-setup/services-select multiselect 

# Enable contrib and non-free*
d-i apt-setup/contrib boolean true
d-i apt-setup/non-free boolean true
d-i apt-setup/non-free-firmware boolean true

# Disable CDROM entries after install
d-i apt-setup/disable-cdrom-entries boolean true

# Disable source repositories too
d-i apt-setup/enable-source-repositories boolean false

# Upgrade installed packages
d-i pkgsel/upgrade select full-upgrade

# Change default hostname
# DISABLED: We take care of this by forking netcfg until #719101 is fixed
# d-i netcfg/get_hostname string kali
# d-i netcfg/get_hostname seen false

# Disable the root user entirely
d-i passwd/root-login boolean false

# Enable eatmydata in kali-installer to boost speed installation
d-i preseed/early_command string anna-install eatmydata-udeb

# Disable question about automatic security updates
d-i pkgsel/update-policy select none

# Disable question about extra media
d-i apt-setup/cdrom/set-first boolean false

## Questions from Debian's regular packages

# Disable popularity-contest
popularity-contest popularity-contest/participate boolean false

# Disable the encfs error message
encfs encfs/security-information boolean true
encfs encfs/security-information seen true

## Random other questions
console-setup console-setup/charmap47 select UTF-8
samba-common samba-common/dhcp boolean false

## Questions from Kali's packages

# Defensive packages
tripwire tripwire/installed boolean true
tripwire tripwire/installed seen true
tripwire tripwire/rebuild-config boolean false
tripwire tripwire/rebuild-policy boolean false
tripwire tripwire/use-localkey boolean false
tripwire tripwire/use-sitekey boolean false

# Do not register it in inetd so that its status can be controlled
# individually
atftpd atftpd/use_inetd boolean false

# Install wireshark setuid
wireshark-common wireshark-common/install-setuid boolean true

# Disable autorun with macchanger
macchanger macchanger/automatically_run boolean false

# Install kismet setuid
kismet-capture-common kismet-capture-common/install-users string
kismet-capture-common kismet-capture-common/install-setuid boolean true

# Use own process for sslh
sslh sslh/inetd_or_standalone select standalone
