Simultaneous user logins

This commit is contained in:
Bob Mottram 2016-11-29 22:19:46 +00:00
parent 83ef278c13
commit 20701521bb
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ case $1 in
;;
maxlogins)
if sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' /etc/security/limits.conf | grep "maxlogins";then
if [ $(sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' /etc/security/limits.conf | grep "maxlogins" | awk -F 'maxlogins' '{print $2}' | sed 's/\ *//g') -lt 10 ];then
if [ $(sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' /etc/security/limits.conf | grep "maxlogins" | awk -F 'maxlogins' '{print $2}' | sed 's/\ *//g') -ne 2 ];then
exit 1
fi
else