Ks.cfg

From ChekMate Security Group

You WILL need to modify this to point to your YAM server and also to define a password for the root account.

#####################################################################
#####################################################################
###
### Copyright (c) 2005 Shannon McNaught
###
### This program is free software; you can redistribute it and/or
### modify it under the terms of the GNU General Public License
### as published by the Free Software Foundation; either version 2
### of the License, or (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
### GNU General Public License for more details.
###------------------------------------------------------------------
### ks.cfg : a Kickstart script for hardening CentOS 4.2 OS
###------------------------------------------------------------------
### Most of this code has been designed, written and is maintained
### by Shannon McNaught. See online wiki for specific developer
### credit. Any questions or comments regarding this code should be
### directed to: smcnaught@axia.com
###
#####################################################################
#####################################################################

#####################################################################
## - - install type/source - - - - - - - - - - -
#
# NEED TO MODIFY!
#
#####################################################################
install
url --url http://YOUR-YAM-SERVER/yam/centos4-i386

#####################################################################
## - - debugging - - - - - - - - - -
## :: uncomment the following to debug a Kickstart config file
#####################################################################
# interactive

#####################################################################
## - - language and input support - - - - - - - -
## :: language used during install
#####################################################################
lang en_US.UTF-8

#####################################################################
## :: mouse used during install
#####################################################################
mouse generic3ps/2

#####################################################################
## :: runtime language and keyboard support
#####################################################################
langsupport --default en_US.UTF-8 en_US.UTF-8
keyboard us

#####################################################################
## - - video card and monitor - - - - - - - - - -
#####################################################################
skipx

#####################################################################
## - - network configuration - - - - - - - - - -
#####################################################################
network --device eth1 --bootproto dhcp

#####################################################################
## - - security and authentication - - - - - - -
#
# NEED TO MODIFY!
#
#####################################################################
rootpw --iscrypted $1$TZQ91/111111dw./RTsaYfssteGC/250
authconfig --enableshadow --enablemd5

#####################################################################
# Firewall Implementation
#####################################################################
firewall --high --enabled --trust=eth1 --ssh

#####################################################################
# SELinux Configuration
#####################################################################
selinux --disabled

#####################################################################
## - - time zone - - - - - - - - - -
#####################################################################
timezone America/Edmonton

#####################################################################
## - - boot loader- - - - - - - - - -
#####################################################################
bootloader --location=mbr

#####################################################################
## - - disk setup - - - - - - - - - -
#
# NEED TO MODIFY!!
#
#####################################################################
# Seperate Partitions: Recommended
# /boot    100MB SDA
# /tmp    1024MB SDA
# /usr    5120MB SDA
# swap    2048MB SDA
# /       *      SDA (Grow to Available Space)
# /home   5120MB SDB
# /var    *      SDB (Grow to Available Space)
clearpart --all --drives=sda,sdb
part /boot --fstype ext3 --size=100 --ondisk=sda
part /home --fstype ext3 --size=5120 --ondisk=sdb
part /usr --fstype ext3 --size=5120 --ondisk=sda
part swap --size=2048 --ondisk=sda
part /var --fstype ext3 --size=1024 --grow --ondisk=sdb
part /tmp --fstype ext3 --size=1024 --ondisk=sda
part / --fstype ext3 --size=1024 --grow --ondisk=sda

#####################################################################
## - - package selection - - - - - - - - - -
## :: reboot the machine when done
## :: (it's up to you to remove the boot media)
#####################################################################
reboot

#####################################################################
## - - package selection - - - - - - - - - -
## :: this is a barebones install - packages are installed via yum in post
#####################################################################
%packages

#####################################################################
## Post Installation Shell Script
#
# NEED TO MODIFY!
#
#####################################################################
%post
cd /root
wget http://YOUR-YAM-SERVER/yam/post-kickstart.sh
sh post-kickstart.sh