#! /bin/bash
# configure feisty servers and workstations

#update apt sources
#desktop
# TO FILL IN
#server
mv /etc/apt/sources.list ~/sources.list.old
cp ~/linuxfiles/serversources /etc/apt/sources.list

#update apt
apt-get update

#update applications
apt-get upgrade

#move old files
mv /etc/libnss-ldap.conf ~/libnss-ldap.conf.old
mv /etc/nsswitch.conf ~/nsswitch.conf.old
mv /etc/pam.d/common-auth ~/common-auth.old
mv /etc/pam.d/common-session ~/common-session.old
mv /etc/pam.d/common-account ~/common-account.old

#install new files
cp ~/linuxfiles/libnss-ldap.conf /etc/libnss-ldap.conf
cp ~/linuxfiles/nsswitch.conf /etc/nsswitch.conf
cp ~/linuxfiles/common-auth /etc/pam.d/common-auth
cp ~/linuxfiles/common-session /etc/pam.d/common-session
cp ~/linuxfiles/common-account /etc/pam.d/common-account
cp ~/linuxfiles/krb5.conf /etc/krb5.conf

#install apps
apt-get install openssl htop build-essential libnss-ldap heimdal-clients libpam-heimdal ntpdate samba smbfs sshfs encfs xterm sun-java6-jre libauthen-pam-perl libnet-ssleay-perl libpam-runtime perl perl-modules

#switch to Sun Java
update-java-alternatives -s java-6-sun

#get Webmin
wget http://umn.dl.sourceforge.net/sourceforge/webadmin/webmin-1.360.tar.gz
tar xzvf webmin-1.360.tar.gz
./webmin-1.360/setup.sh

#update time
ntpdate time.apple.com

#update applications again
apt-get upgrade

 

{mos_fb_discuss:3}