aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh/level5.sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-12-16 17:48:54 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-12-16 17:48:54 +0000
commited13442ca9484b8001f062de5b2c4cc7f9530ef4 (patch)
tree4d20dfaf45c18d82b83d26e822d476711ab81bac /init-sh/level5.sh
parentf3eab9ee9a13b620d4d3eb27d72efd43e9158d21 (diff)
downloadmsec-ed13442ca9484b8001f062de5b2c4cc7f9530ef4.tar
msec-ed13442ca9484b8001f062de5b2c4cc7f9530ef4.tar.gz
msec-ed13442ca9484b8001f062de5b2c4cc7f9530ef4.tar.bz2
msec-ed13442ca9484b8001f062de5b2c4cc7f9530ef4.tar.xz
msec-ed13442ca9484b8001f062de5b2c4cc7f9530ef4.zip
*** empty log message ***
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
-
-
-