Cochise Linux Users Group
Home > Linux  

Slackware System Hardening
Copyright (c) 2002 Jeffrey Denton

Written by Jeffrey Denton
4 June 2002
version - 0.4

This is a list of some of the steps I take to improve the security on my
Slackware systems. It is by no means complete. You can either do all of
the things I do, or you can choose only the ones you feel would help secure
your system.

WARNING: Hardening a system is a compromise between security
and usability. Some of the things I do would adversely
affect the usability of your system and may very well
break things. Please have one of the following on hand
just in case you lock yourself out of your system:

Tom's Rootboot -
The "Live" CD that comes with the official version of

And of course, make sure you have a bootdisk. You do
have a bootdisk, right? If you don't have one, run

You should also make a backup of any anything that you
feel is important, would be hard to replace, or that
you simply cannot do without. If you are either new
to linux or don't know what you are doing, you could
very easily get carried away with hardening a system
and end up with a system that is unusable.

You have been warned.

Note: - Line numbers correspond to the rc.scripts in Slackware 8.0.
- The settings assume only one user is on the system, "dentonj".
- Associated man pages are listed.
- I will comment this document as I get to it.

-- Resources --

-- Keep Current --
-- Disable Daemons/Close Ports --

Lines 171-175:comment out isapnp.conf
Lines 193-195: comment out rc.pcmcia

Lines 50-53:comment out lpd
Line 67:comment out atd
Lines 117-122:comment out apmd
Lines 141-143:comment out rc.ibcs2
#Lines 146-148:comment out rc.httpd
Lines 155-157:comment out samba

Line 23 add: -udpPort 0

Line 22:IPV4_FORWARD=0
Lines 48-51:comment out rpc.portmapper
Lines 83-88:comment out inetd
Lines 108-110:comment out rc.nfsd
Lines 114-117:comment out lpd

chmod -R go-rwx /etc/rc.d
chmod 600 /usr/lib/news/bin/

grep -v "^#" /etc/inetd.conf
Comment the results
man inetd


serverargs="-nolisten tcp"
man Xserver

-- Limit Access --

/sbin/lilo -v

man lilo.conf

+:root dentonj:localhost
-:ALL EXCEPT root dentonj:ALL

man login.access

Line 38:LOG_OK_LOGINS yes
Line 86:uncomment SULOG_FILE
Line 98:uncomment ISSUE_FILE
Line 206:UMASK 077
Line 217:PASS_MAX_DAYS 30
Line 217:PASS_MIN_LEN 8
Line 285:comment out CHFN_RESTRICT
Line 319:DEFAULT_HOME no

man login.defs


man suauth


man porttime

dentonj L1K077C0

man limits

Delete the following:

Add the following:
man shells

/etc/passwd & /etc/shadow:
Delete the following:

Add /bin/false as the shell to the following:

Note: Don't run these if you like to make the passwd and shadow file immutabled (chattr +i ...). It gets ugly.
/usr/bin/passwd -x 30 -w 7 root
/usr/bin/passwd -x 30 -w 7 dentonj

man 1 passwd
man 5 passwd
man 5 shadow

Delete the following:


man group
man grpck
man pwck

The above may create a long list of programs that no longer belong to any group.
find / -nouser -o -nogroup -ls > nouser
chown root.root

ALL ALL=/usr/local/sbin/logit
ALL ALL=/usr/bin/tail

man sudo
man sudoers
man visudo

Add the following:

man ftpusers

nospoof on
spoofalert on

man host.conf


man hosts_access


man hosts_access

touch /etc/hosts.lpd

Make sure file is empty

man hosts.equiv

Comment ALL except MAILER_DAEMON and postmaster

man aliases
man newaliases

Make sure all lines are commented

man xdm


-- Logging --

Line 45: /usr/sbin/syslogd -m 0
Line 48: /usr/sbin/klogd -c 3 -p

man syslogd
man klogd

Line 74: /usr/sbin/syslogd -m 0
Line 78: /usr/sbin/klogd -c 3 -p

man syslogd
man klogd


touch /var/log/mail
touch /var/log/faillog

man syslog.conf
man 5 faillog
man 8 faillog

Line 168: comment out overwritting motd

/etc/motd, /etc/, and /boot/boot_message.txt:

Unauthorized access prohibited; all access and activities not
explicitly authorized by the administrator are unauthorized.
All activities are monitored and logged. There is no privacy
on this system. Unauthorized access and activities or any
criminal activity will be reported to appropriate authorities.

/sbin/lilo -v

man issue
man motd

-- Filesystem --

Lines 58,60: comment out mounting NFS
Lines 65,67: comment out mounting smbfs

Make sure it's empty.

man exports

/dev/hdb1 swap swap defaults 0 0
/dev/hdb5 / ext3 defaults 1 1
/dev/hdb6 /var ext3 rw,nosuid,nodev 0 2
/dev/hdb7 /tmp ext3 rw,nosuid,nodev,noexec 0 2
/dev/hdb8 /usr ext3 defaults 0 2
/dev/hdb9 /home ext3 rw,nosuid,nodev 0 0
/dev/hda1 /mnt/windows vfat rw,nosuid,nodev,noexec,noauto 0 0
/dev/hda2 /mnt/slack ext2 rw,noauto 0 0
/dev/fd0 /mnt/floppy auto rw,nodev,noauto 0 0

mkdir /mnt/windows
mkdir /mnt/slack
mkdir /mnt/floppy

man fstab
man nfs

Change how often fsck is run during boot:
for i in hdb5 hdb6 hdb7 hdb8 hdb9; do
tune2fs -c 0 /dev/$i
tune2fs -i 1m /dev/$i

man tune2fs

-- File Permissions --

chattr +i /etc/exports
chattr +i /etc/hosts.equiv
chattr +i /etc/hosts.lpd
chattr +i /etc/inetd.conf
chattr +i /etc/lilo.conf
chattr +i /etc/login.access
chattr +i /etc/login.defs
chattr +i /etc/porttime
chattr +i /etc/protocols
chattr +i /etc/securetty
chattr +i /etc/services
chattr +i /etc/suauth

man chattr

Remove unneeded files:
rm /etc/csh.cshrc /etc/csh.login

man tcsh

chmod a long list of files:

chmod 750 /bin/mt-st
chmod 600 /etc/ftpusers
chmod 600 /etc/hosts.allow
chmod 600 /etc/hosts.deny
chmod 600 /etc/inetd.conf
chmod 600 /etc/inittab
chmod 600 /etc/lilo.conf
chmod 600 /etc/login.defs
chmod 600 /etc/securetty
chmod 600 /etc/suauth
chmod 440 /etc/sudoers
chmod 600 /etc/syslog.conf
chmod 750 /sbin/badblocks
chmod 750 /sbin/debugfs
chmod 750 /sbin/depmod
chmod 750 /sbin/dumpe2fs
chmod 750 /sbin/explodepkg
chmod 750 /sbin/fdisk
chmod 750 /sbin/fsck
chmod 750 /sbin/fsck.ext2
chmod 750 /sbin/fsck.minix
chmod 750 /sbin/ftl_check
chmod 750 /sbin/ftl_format
chmod 750 /sbin/halt
chmod 750 /sbin/hwclock
chmod 750 /sbin/ifconfig
chmod 750 /sbin/ifport
chmod 750 /sbin/ifuser
chmod 750 /sbin/init
chmod 750 /sbin/insmod
chmod 750 /sbin/installpkg
chmod 750 /sbin/isapnp
chmod 750 /sbin/killall5
chmod 750 /sbin/lilo
chmod 750 /sbin/makepkg
chmod 750 /sbin/mke2fs
chmod 750 /sbin/mkfs
chmod 750 /sbin/mkfs.minix
chmod 750 /sbin/mkdosfs
chmod 750 /sbin/mkraid
chmod 750 /sbin/mkswap
chmod 750 /sbin/modinfo
chmod 750 /sbin/netconfig.color
chmod 750 /sbin/netconfig.tty
chmod 750 /sbin/pkgtool
chmod 750 /sbin/pnpdump
chmod 750 /sbin/removepkg
chmod 750 /sbin/rpc.portmap
chmod 750 /sbin/quotaon
chmod 750 /sbin/rdev
chmod 750 /sbin/runlevel
chmod 750 /sbin/setserial
chmod 750 /sbin/swapon
chmod 750 /sbin/tune2fs
chmod 750 /sbin/upgradepkg
chmod 750 /sbin/uugetty
chmod 750 /usr/bin/eject
chmod 4750 /usr/bin/gpasswd
chmod 750 /usr/bin/lpq
chmod 750 /usr/bin/lprm
chmod 4750 /usr/bin/lpr
chmod 750 /usr/bin/minicom
chmod 700 /usr/bin/nohup
chmod 700 /usr/bin/script
chmod 500 /usr/lib/news/bin/inndstart
chmod 500 /usr/lib/news/bin/startinnfeed
chmod 750 /usr/lib/setup/cpkgtool
chmod 750 /usr/lib/setup/hdsetup
chmod 750 /usr/sbin/atd
chmod 750 /usr/sbin/atrun
chmod 750 /usr/sbin/crond
chmod 750 /usr/sbin/ctrlaltdel
chmod 750 /usr/sbin/dhcpd
chmod 750 /usr/sbin/dhcrelay
chmod 750 /usr/sbin/edquota
chmod 750 /usr/sbin/groupadd
chmod 750 /usr/sbin/groupdel
chmod 750 /usr/sbin/groupmod
chmod 750 /usr/sbin/grpck
chmod 750 /usr/sbin/grpconv
chmod 750 /usr/sbin/grpunconv
chmod 750 /usr/sbin/hdparm
chmod 750 /usr/sbin/imapd
chmod 750 /usr/sbin/in.comsat
chmod 755 /usr/sbin/in.fingerd
chmod 755 /usr/sbin/in.identd
chmod 750 /usr/sbin/in.talkd
chmod 000 /usr/sbin/in.rexecd
chmod 000 /usr/sbin/in.rlogind
chmod 000 /usr/sbin/in.rshd
chmod 750 /usr/sbin/in.telnetd
chmod 000 /usr/sbin/in.tftpd
chmod 750 /usr/sbin/in.timed
chmod 750 /usr/sbin/inetd
chmod 750 /usr/sbin/ipop3d
chmod 750 /usr/sbin/klogd
chmod 2750 /usr/sbin/lpc
chmod 740 /usr/sbin/lpd
chmod 750 /usr/sbin/lpf
chmod 550 /usr/sbin/makemap
chmod 750 /usr/sbin/mouseconfig
chmod 750 /usr/sbin/named
chmod 750 /usr/sbin/newusers
chmod 750 /usr/sbin/nmbd
chmod 750 /usr/sbin/ntpdate
chmod 750 /usr/sbin/ntpq
chmod 750 /usr/sbin/ntptime
chmod 750 /usr/sbin/ntptrace
chmod 750 /usr/sbin/pppd
chmod 750 /usr/sbin/pwck
chmod 750 /usr/sbin/pwconv
chmod 750 /usr/sbin/pwunconv
chmod 550 /usr/sbin/quotastats
chmod 750 /usr/sbin/rpc.bootparamd
chmod 750 /usr/sbin/rpc.mountd
chmod 750 /usr/sbin/rpc.nfsd
chmod 750 /usr/sbin/rpc.rusersd
chmod 750 /usr/sbin/rpc.rwalld
chmod 750 /usr/sbin/rpc.yppasswdd
chmod 750 /usr/sbin/rpc.ypxfrd
chmod 750 /usr/sbin/rpcinfo
chmod 750 /usr/sbin/showmount
chmod 750 /usr/sbin/smbd
chmod 750 /usr/sbin/syslogd
chmod 750 /usr/sbin/tcpd
chmod 750 /usr/sbin/tcpdchk
chmod 750 /usr/sbin/tcpdmatch
chmod 750 /usr/sbin/tcpdump
chmod 750 /usr/sbin/timeconfig
chmod 750 /usr/sbin/useradd
chmod 750 /usr/sbin/userdel
chmod 750 /usr/sbin/usermod
chmod 750 /usr/sbin/vipw

man chmod

To make things easier, you can download a file that contains the
above list and run the short awk command below:
awk -F: '{
  print "chmod "$1" "$4
  system ("/bin/chmod "$1" "$4)
  print "chown "$2"."$3" "$4
  system ("/bin/chown "$2"."$3" "$4)
}' < fileperm

man chmod
man chown
man gawk

More chmod:
chmod -R o-rwx /var/log
chmod -R go-rwx /home/dentonj
chmod -R go-rwx /root

man chmod

Find SUID/SGID files and directories:
find / -type f \( -perm -4000 -o -perm -2000 \) -ls > suid_files.out
find / -type d \( -perm -4000 -o -perm -2000 \) -ls > suid_dir.out
chmod ug-s # To remove the SUID/SGID bit

man chmod
man find

Find world and group writable files and directories:
find / -type f \( -perm -2 -o -perm -20 \) -ls > write_files.out
find / -type d \( -perm -2 -o -perm -20 \) -ls > write_dir.out

man find

-- rc.local --


# Network hardening

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/ip_always_defrag
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
for i in /proc/sys/net/ipv4/conf/*/log_martians; do
  echo 1 > $i
for i in /proc/sys/nit/ipv4/conf/*/rp_filter; do
  echo 1 > $i
for i in /proc/sys/net/ipv4/conf/*/accept_source_route; do
  echo 0 > $i
# Network optimizing

echo "32768-64000" > /proc/sys/net/ipv4/ip_local_port_range
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 1800 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
echo 0 > /proc/sys/net/ipv4/tcp_sack
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
# Obscrurity

echo 255 > /proc/sys/net/ipv4/ip_default_ttl

# System optimizing

echo "100 1200 128 512 500 5000 500 1884 1" \
> /proc/sys/vm/bdflush
echo "80 10 60" > /proc/sys/vm/buffermem
echo 6144 > /proc/sys/fs/file-max
echo 24576 > /proc/sys/fs/inode-max

# Start various security programs
#/usr/psionic/portsentry/portsentry -atcp
#/usr/psionic/portsentry/portsentry -sudp
/usr/sbin/icmpinfo -vv -s -l
/usr/local/sbin/accton /var/accout/pacct
/etc/rc.d/rc.firewall start
if [ -x /usr/sbin/logoutd ]; then
# Various system settings
/usr/bin/setleds -D +num

# This is harddrive specific
/usr/sbin/hdparm -c3 -A1 -m16 -d1 /dev/hdb
man hdparm
man logoutd
man setleds

-- Cron --


# Sync clocks
0 0 * * * /usr/sbin/ntpdate; hwclock --systohc
# Security programs
0 0 * * * /usr/local/etc/
#1 1 * * * /usr/local/sbin/tripwire -m c | mail -s \
  "Tripwire report for $HOSTNAME" root@localhost 2> /dev/null
0 4 * * * /usr/local/sbin/sxid
0 23 * * * cd /usr/local/sbin/; ./chkrootkit | mail -s \
  "Chkrootkit report from $HOSTNAME" root@localhost
0 22 * * * /usr/local/sbin/aide --config=/etc/aide.conf | mail -s \
  "AIDE report from $HOSTNAME" root@localhost
0 0 * * * /usr/local/seccheck/security-control daily&
0 1 * * 1 /usr/local/seccheck/security-control weekly&
0 4 1 * * /usr/local/seccheck/security-control monthly&

# System cleanup
0 3 * * * /usr/bin/find -type f -name core \
  -exec /bin/rm -rf {} \; 2> /dev/null
0 3 * * * /usr/bin/find /tmp -atime +7 \
  -exec /bin/rm -rf {} \; 2> /dev/null
0 3 * * * /usr/bin/find /var/temp -atime +7 \
  -exec /bin/rm -f {} \; 2> /dev/null
0 3 * * * /usr/bin/find /var/spool/lpd \( -name "cf*" -o -name "df*" \) \
  -type f -atime +2 -exec /bin/rm -f {} \; 2> /dev/null
# Paranoid checks
0 3 * * * /bin/chmod -R go-rwx /home/dentonj
0 3 * * * /bin/chmod -R go-rwx /root
0 3 * * * /bin/rm -f /home/*/dead.letter
0 3 * * * /usr/bin/find / -name .rhosts -o -name .forward -ls \
  -exec /usr/bin/cat {} \; | mail -s \
".rhosts or .forward files on $HOSTNAME" root@localhost 2> /dev/nul

man crond
man crontab

-- Bash --
Lines 26-28: comment out section adding "." to PATH
Lines 57-58: comment out and add:
  elif [ `id -u` = "0" ]; then
    PS1="\[\033[1;31m\[\t [\j]:\w\$\[\033[0m\] "
    PS1="\[\033[1;32m\[\t [\j]:\w\$\[\033[0m\] "
Line 70: umask 077
# Limit history for root and the user that can su to root
if [ `id -u` = "0" -o `echo $USER` = "dentonj" ]; then
# Logout if a root terminal is left unused for too long
if [ `id -u` = "0" ]; then
    export TMOUT
# Misc settings:
shopt -s cdspell
shopt -s cmdhist
shopt -s dotglob
shopt -s extglob
setterm -bfreq 0
typeset -r HISTFILE
typeset -r HISTSIZE
typeset -r HISTNAME
typeset -r USER
typeset -r LOGNAME

# Aliases:
# shred doesn't delete recursively, use "/bin/rm -rf ..."
alias rm="shred -uz"

man bash


clear && rm /root/.bash_history

man bash

-- Misc --

Line 18: /bin/setterm -blank 0

man setterm

alias net-pf-9 off

man modules.conf

Welcome to \s (\l) \t - \U

man issue

Line 35: comment out ctrlaltdel

man init
man inittab

set show-all-if-ambiguous on
set visible-stats on
set mark-modified-lines on

man bash

faillog -u dentonj -m 5

man faillog

Make a backup of commonly trojaned commands:
Note: Only do this after a fresh install. Making copies of
already trojaned commands will just ruin your day.
Otherwise, copy the commands from the "Live CD" that
comes with the official version of Slackware.
cd /root
mkdir bin

Copy the following to /root/bin:
agetty egrep in.fingerd killall ps tcpd
basename env in.identd login pstree top
biffexplodepkg in.pop3d ls removepkg traceroute
chfnfind in.rlogind lsattr rpcinfo upgradepkg
chshgetty in.rshd mail sendmail write
crontab gnu-pop3d in.telnetd makepkg ssh
dategpm in.timed named sshd
dirname grep inetd netstat su
du hdparminstallpkg passwd syslogd
echoifconfig kill pidof tar

cd /root/bin
md5sum * >> md5sum
cd /root
tar zcvf bin.tar.gz ./bin
cp bin.tar.gz /dev/fd0

-- Program Hardening --

Lines 220-221: comment out DaemonPortOptions
Add: O DaemonPortOptions=Port=smtp,Addr=, Name=MTA
Line 178: O Helpfile=
Line 227: O PrivacyOptions=goaway
Line 356: O SmtpGreetingMessage=HI You look lost. Please return
to your little corner of the internet.
rm /etc/mail/helpfile

man sendmail

Host *
ForwardAgent no
ForwardX11 no
RhostsAuthentication no
RhostsRSAAuthentication no
RSAAuthentication yes
PasswordAuthentication yes
FallBackToRsh no
UseRsh no
BatchMode no
CheckHostIP yes
StrictHostKeyChecking no
IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_dsa
IdentityFile ~/.ssh/id_rsa
Port 22
Protocol 2
Cipher blowfish
Compression yes
CompressionLevel 6
KeepAlive no
EscapeChar ~

man ssh

Port 22
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 3600
#ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 600
PermitRootLogin no
StrictModes yes
PasswordAuthentication yes
PermitEmptyPasswords no
#RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
RhostsAuthentication no
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
IgnoreUserKnownHosts yes
AllowUsers dentonj
X11Forwarding no
X11DisplayOffset 10
AllowTcpForwarding yes
PrintMotd yes
PrintLastLog no
KeepAlive no
#UseLogin no
Banner /etc/
ReverseMappingCheck yes

Subsystem sftp /usr/libexec/sftp-server

man sftp
man sftp-server
man sshd

-- Security Programs/Scripts --
Install the following programs:
Kernel patches: (only apply one)
Openwall Patch
Openwall kernel patch

mkdir /var/account
touch /var/account/pacct
touch /var/account/savacct
touch /var/acocunt/useracct


/boot R
/dev R
/etc R
/bin R
/opt R
/sbin R
/usr R
/var R
/var/spool/cron R

chattr +i /etc/aide.conf
chattr +i /etc/aide.db
Install the following to /usr/local/sbin/:
touch /var/log/iplog
mkdir /var/run/iplog
user nobody
group nobody
pid-file /var/run/iplog/
logfile /var/log/iplog
facility log_daemon
priority log_info
set log_ip true
set log_dest true
set ignore_dns true
interface eth0
set frag true
set smurf true
set bogus true
set fin_scan true
set syn_scan true
set udp_scan true
set portscan true
set xmas_scan true
set null_scan true
set traceroute true
set fool_nmap true
set syn_flood true
set ping_flood true
set verbose true
ignore tcp dport 80
Disable Loadable Kernel Module support.
Patch with one of the following patches.

Openwall Patch:
Currently for 2.0.x and 2.2.x kernels
A beta version is available for 2.4.x kernels
Patch kernel and compile with all of the patche's options enabled

GRSecurity Patch:
For 2.4.x kernels
I have not been impressed with this patch, so use it at your
own discretion.

Supposedly this will work without having to install LIDS.
bzip2 -cd lcap-0.0.6.tar.bz2 | tar xvf -
cd lcap-0.0.6
gcc -o lcap lcap.c
cp lcap /usr/local/sbin
cp lcap.8 /usr/local/man/man8


Straight from TrinityOS. Add the following:
tail -f /var/log/messages&
tail -f /var/log/access_log&
tail -f /var/log/cron&
tail -f /var/log/iplog&
tail -f /var/log/loginlog&
tail -f /var/log/mail&
tail -f /var/log/proftpd.log&
tail -f /var/log/secure&
tail -f /var/log/sulog&
tail -f /var/log/syslog&
tail -f /var/log/apache/access_log&
tail -f /var/log/apache/error_log&





I noticed that PortSentry didn't always log FIN or NULL scans,
so I now use Iplog.

This is one of the ipchains packet filter scripts that I've
put together. Don't ask me about iptables. If you want a
statefull packet filter, you should really be running OBSD.




The following is a script that I add to the beginning of /etc/profile. While
the script is a nice idea, it's very easy for someone to avoid . I've never
had any of my systems cracked since I've started using it, so I have no idea
if this script will actually stop anyone. It would most likely catch someone
in the act, after they exploited a security hole, but before the system has
been r00ted. A r00ted system wouldn't even bother reading /etc/profile.

-- Begin script added to /etc/profile --
# Kick and ban users that are UID 0 but are NOT root!
if [ `id -u` = "0" -a `echo $USER` != "root" ]; then

   # Lock the user out
   passwd -l $USER

   # Save some info
   date >> /root/SHIT
   netstat -apent >> /root/SHIT
   ps auxww >> /root/SHIT
   w >> /root/SHIT

   w | mail -s "$USER has gained ROOT access" root@localhost

   # Let EVERYONE know

wall << EOF

$USER has gained ROOT access!!!
   for i in `ls /dev/pts/`; do
      echo -e "\n$USER has gained ROOT access!!\n" >> /dev/pts/$i

   # Log it
   logger -is -f /var/log/messages "$USER has gained ROOT access!!"

   # Let the luzer know
   echo -e "\a\n\n You are _NOT_ root!!\\n\n\a"

   # Kill the user and his processes
   skill -9 -u $USER

   ifconfig eth0 down

   # This should be redundant

# Attempt to catch those that su
alias su="su -"

-- End script added to /etc/profile --