In the spirit of Thomas Limoncelli's Time Management for System Administrators, this is my checklist for setting up a new Debian system. I have added a few notes to the original list to justify their existence and to provide some background information.
Whilst you should avoid performing repetitive interactive configuration and defer to the multitude of tools designed for this task, constructing and sharing a checklist can still be an instructive step. It can also be useful in situations where a machine has already been partly configured for you.
Software
/etc/apt/sources.list
Choose a sensible primary mirror
Ensure use of release codenames (eg. "lenny") instead of synonyms
Confirm security mirror is enabled
Remove references to contrib and non-free
Disable installation of Recommends:
echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/90recommends
Ensure we are up to date security-wise:
apt-get update && apt-get dist-upgrade
Setup and configure locales first to avoid annoying Perl warnings. Don't choose All locales; you almost certainly don't want that.
apt-get install locales
dpkg-reconfigure -plow locales
Install some essential utilities:
apt-get install vim-nox ntp openssh-server screen most tree bzip2 unzip moreutils dnsutils htop pwgen telnet manpages manpages-dev vrms acl gawk strace curl tcpdump
Users
Before we create any real users, we configure PAM to reject weak passwords. Custom banned passwords can be added to the dictionary by editing /usr/share/dict/cracklib and running update-cracklib.
apt-get install libpam-cracklib
sed -i -e 's|^password|# \0|' /etc/pam.d/common-password
echo 'password required pam_cracklib.so retry=3 minlen=6 difok=3' >> /etc/pam.d/common-password
echo 'password required pam_unix.so use_authtok nullok md5' >> /etc/pam.d/common-password
(Edit: Please read this response from Steve Langasek regarding this modification on squeeze and Ubuntu 8.10)
Configure sudo. I prefer to create a new group instead of re-using adm as that is already used by logfiles.
addgrou