aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh/lib.sh
diff options
context:
space:
mode:
authorFlorin Grad <florin@mandriva.com>2001-09-19 12:18:16 +0000
committerFlorin Grad <florin@mandriva.com>2001-09-19 12:18:16 +0000
commit5dafd636b6afef22a21571bd0af6d334ddb88ed8 (patch)
tree157b8ad4c49dee602d333b7ebba7a955a2eb389e /init-sh/lib.sh
parente97350555ed7a2339e247a9e44edabd4705a3d1f (diff)
downloadmsec-5dafd636b6afef22a21571bd0af6d334ddb88ed8.tar
msec-5dafd636b6afef22a21571bd0af6d334ddb88ed8.tar.gz
msec-5dafd636b6afef22a21571bd0af6d334ddb88ed8.tar.bz2
msec-5dafd636b6afef22a21571bd0af6d334ddb88ed8.tar.xz
msec-5dafd636b6afef22a21571bd0af6d334ddb88ed8.zip
RootSshLogin
Diffstat (limited to 'init-sh/lib.sh')
-rw-r--r--init-sh/lib.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/init-sh/lib.sh b/init-sh/lib.sh
index 9fb580f..baf2b4f 100644
--- a/init-sh/lib.sh
+++ b/init-sh/lib.sh
@@ -297,6 +297,19 @@ AllowReboot() {
echo "done."
}
+RootSshLogin () {
+ echo -n "Setting up the root ssh login : "
+ if [[ $1 == 4 || $1 == 5 ]]; then
+ /bin/sed 's/PermitRootLogin yes/PermitRootLogin no/' < /etc/ssh/sshd_config > /etc/ssh/sshd_config.new
+ mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config
+ chmod 0600 /etc/ssh/sshd_config
+ else
+ sed 's/PermitRootLogin no/PermitRootLogin yes/' < /etc/ssh/sshd_config > /etc/ssh/sshd_config.new
+ mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config
+ chmod 0600 /etc/ssh/sshd_config
+ fi
+}
+
# If we are currently installing our
# system with DrakX, we don't ask anything to the user...
# Instead, DrakX do it and give us a file with some variable.