aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2015-09-10 10:30:53 +0000
committercassio <cassiopc@gmail.com>2015-09-10 10:30:53 +0000
commiteab4a88d06b8b845a8983af59da71457aa9f3dd6 (patch)
treee554fbf17cc3d74404030f884f17bca35ddbd4bd /tools
parent0275d9a10cafd301239dc09d1400973a5e44ed98 (diff)
downloadboca-eab4a88d06b8b845a8983af59da71457aa9f3dd6.tar.gz
boca-eab4a88d06b8b845a8983af59da71457aa9f3dd6.zip
improved position of deny ssh, better output autoj, score bkp per user
Diffstat (limited to 'tools')
-rwxr-xr-xtools/installv2.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/installv2.sh b/tools/installv2.sh
index db2aa96..5b756da 100755
--- a/tools/installv2.sh
+++ b/tools/installv2.sh
@@ -181,6 +181,15 @@ if [ "`which gconftool`" != "" ]; then
su - icpc -c "gconftool -s -t bool /apps/update-notifier/auto_launch false"
fi
+grep -q icpcadmin /etc/ssh/sshd_config
+if [ "$?" != "0" ]; then
+ echo "DenyUsers icpc icpcadmin" >> /etc/ssh/sshd_config
+ ps auxw |grep sshd|grep -vq grep
+ if [ "$?" == "0" ]; then
+ service ssh reload
+ fi
+fi
+
pass=`echo -n icpc | makepasswd --clearfrom - --crypt-md5 | cut -d'$' -f2-`
pass=\$`echo $pass`
id -u icpc >/dev/null 2>/dev/null
@@ -289,11 +298,6 @@ if [ $? != 0 ]; then
sed "s/errors=remount-ro/quota,errors=remount-ro/" < /etc/fstab.bkp.$di.1 > /etc/fstab
fi
-grep -q icpcadmin /etc/ssh/sshd_config
-if [ "$?" != "0" ]; then
- echo "DenyUsers icpc icpcadmin" >> /etc/ssh/sshd_config
-fi
-
echo "============================================================"
echo "===================== SETTING UP USER QUOTA ==============="
echo "============================================================"