aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-12-15 10:48:11 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-12-15 10:48:11 +0000
commit69e05f810985bfa55c62a05c6fc5e4050245eecf (patch)
treee371135b9e6fd90d5eaadd5abc1bf16b6d8b9eb0 /init-sh
parent18228772b4d4d9960e3d7b10293519b50287695e (diff)
downloadmsec-69e05f810985bfa55c62a05c6fc5e4050245eecf.tar
msec-69e05f810985bfa55c62a05c6fc5e4050245eecf.tar.gz
msec-69e05f810985bfa55c62a05c6fc5e4050245eecf.tar.bz2
msec-69e05f810985bfa55c62a05c6fc5e4050245eecf.tar.xz
msec-69e05f810985bfa55c62a05c6fc5e4050245eecf.zip
*** empty log message ***
Diffstat (limited to 'init-sh')
-rwxr-xr-xinit-sh/level0.sh5
-rwxr-xr-xinit-sh/level1.sh6
-rwxr-xr-xinit-sh/level2.sh5
-rwxr-xr-xinit-sh/level3.sh6
-rwxr-xr-xinit-sh/level4.sh5
-rwxr-xr-xinit-sh/level5.sh5
-rw-r--r--init-sh/lib.sh1
7 files changed, 33 insertions, 0 deletions
diff --git a/init-sh/level0.sh b/init-sh/level0.sh
index 2dfbc1e..0aed416 100755
--- a/init-sh/level0.sh
+++ b/init-sh/level0.sh
@@ -55,6 +55,11 @@ echo -n "Running lilo to record new config : "
/sbin/lilo >& /dev/null
echo -e "done.\n"
+# /etc/inittab
+echo "Enabling direct console access : "
+AddRules "1:2345:respawn:/bin/bash --login tty1" /etc/inittab
+echo "done.\n"
+
# /etc/profile
export SECURE_LEVEL=1
echo "Setting secure level variable to 1 :"
diff --git a/init-sh/level1.sh b/init-sh/level1.sh
index fe56164..b7b1c3e 100755
--- a/init-sh/level1.sh
+++ b/init-sh/level1.sh
@@ -55,6 +55,12 @@ echo -n "Running lilo to record new config : "
/sbin/lilo >& /dev/null
echo -e "done.\n"
+# /etc/inittab
+echo "Disabling direct console access : "
+AddRules "1:2345:respawn:/sbin/mingetty tty1" /etc/inittab
+echo "done.\n"
+
+
# /etc/profile
export SECURE_LEVEL=1
echo "Setting secure level variable to 1 :"
diff --git a/init-sh/level2.sh b/init-sh/level2.sh
index 39cb7d1..c876ed9 100755
--- a/init-sh/level2.sh
+++ b/init-sh/level2.sh
@@ -55,6 +55,11 @@ echo -n "Running lilo to record new config : "
/sbin/lilo
echo -e "done.\n"
+# /etc/inittab
+echo "Disabling direct console access : "
+AddRules "1:2345:respawn:/sbin/mingetty tty1" /etc/inittab
+echo "done.\n"
+
# /etc/profile
export SECURE_LEVEL=2
echo "Setting secure level variable to 2 :"
diff --git a/init-sh/level3.sh b/init-sh/level3.sh
index 77d8a9a..8e8a456 100755
--- a/init-sh/level3.sh
+++ b/init-sh/level3.sh
@@ -59,10 +59,16 @@ echo "Adding permission check in crontab (scheduled every midnight) :"
AddRules "0 0 * * * root nice --adjustment=+19 /etc/security/msec/cron-sh/diff_check.sh" /etc/crontab
AddRules "0 0 * * * root nice --adjustment=+19 /etc/security/msec/cron-sh/security_check.sh" /etc/crontab
+# lilo update
echo -n "Running lilo to record new config : "
/sbin/lilo >& /dev/null
echo -e "done.\n"
+# /etc/inittab
+echo "Disabling direct console access : "
+AddRules "1:2345:respawn:/sbin/mingetty tty1" /etc/inittab
+echo "done.\n"
+
# /etc/profile
export SECURE_LEVEL=3
echo "Setting secure level variable to 3 :"
diff --git a/init-sh/level4.sh b/init-sh/level4.sh
index 874634f..b0ebeea 100755
--- a/init-sh/level4.sh
+++ b/init-sh/level4.sh
@@ -79,6 +79,11 @@ echo -n "Running lilo to record new config : "
/sbin/lilo >& /dev/null
echo -e "done.\n"
+# /etc/inittab
+echo "Disabling direct console access : "
+AddRules "1:2345:respawn:/sbin/mingetty tty1" /etc/inittab
+echo "done.\n"
+
# Server update
echo "Setting secure level variable to 4 :"
AddRules "SECURE_LEVEL=4" /etc/profile
diff --git a/init-sh/level5.sh b/init-sh/level5.sh
index 32f0c8d..14b7e9d 100755
--- a/init-sh/level5.sh
+++ b/init-sh/level5.sh
@@ -73,6 +73,11 @@ echo -n "Running lilo to record new config : "
/sbin/lilo >& /dev/null
echo -e "done.\n"
+# /etc/inittab
+echo "Disabling direct console access : "
+AddRules "1:2345:respawn:/sbin/mingetty tty1" /etc/inittab
+echo "done.\n"
+
# Disable all server :
echo "Setting secure level variable to 5 :"
AddRules "SECURE_LEVEL=5" /etc/profile
diff --git a/init-sh/lib.sh b/init-sh/lib.sh
index 2640ba6..e519ad8 100644
--- a/init-sh/lib.sh
+++ b/init-sh/lib.sh
@@ -185,6 +185,7 @@ fi
clear
echo "Preparing to run security script : "
+CleanRules /etc/inittab
CleanRules /etc/syslog.conf
CleanRules /etc/hosts.deny
CommentUserRules /etc/hosts.deny