aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-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
8 files changed, 34 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ac854b5..761d8a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
1999-15-10 Yoann Vandoorselaere <yoann@mandrakesoft.com>
+ * As requested, direct shell access for level 0
* Fixed a little problem with the DRAKX_USERS variable
* removed chattr +a because of the problem it can cause to
other system automated system task
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