aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh/level5.sh
diff options
context:
space:
mode:
Diffstat (limited to 'init-sh/level5.sh')
-rwxr-xr-xinit-sh/level5.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/init-sh/level5.sh b/init-sh/level5.sh
index eaa06fe..e443488 100755
--- a/init-sh/level5.sh
+++ b/init-sh/level5.sh
@@ -73,10 +73,6 @@ 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
-
# Disable all server :
echo "Setting secure level variable to 5 :"
AddRules "SECURE_LEVEL=5" /etc/profile
@@ -107,6 +103,14 @@ echo "Adding \"normal\" PATH variable :"
AddRules "PATH=\$PATH:/usr/X11R6/bin" /etc/profile quiet
AddRules "export PATH SECURE_LEVEL" /etc/profile
+# Do not boot on a shell
+echo -n "Setting up inittab to ask a passwd on boot : "
+tmpfile=`mktemp /tmp/secure.XXXXXX`
+cp /etc/inittab ${tmpfile}
+cat ${tmpfile} | sed s'/\/bin\/bash --login/\/sbin\/mingetty tty1/' > /etc/inittab
+rm -f ${tmpfile}
+echo "done."
+
echo
echo "You are now running your system in security level 5,"
echo "All services are disabled : try the chkconfig to enable one..."
@@ -131,6 +135,3 @@ echo
-
-
-