Restrict number of logins allowed for a user
To restrict multiple logins, place the following lines in the users .profile
# Limit number of logins allowed Times_allowed=2 Time_in=`who | grep $LOGNAME | wc -l` if [ $Time_in -gt "$Times_allowed" ] then echo "$LOGNAME is already logged in $Times_allowed times!" exit exec /bin/login fi
Then chmod 444 and chown root .profile
Still stuck? Maybe we can help. Contact us here
For more super cool techie stuff check out our blog!!