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

Recent Changes

Contribute to this wiki

Why not help others by sharing your knowledge? Contribute something to this wiki and join out hall of fame!
Contact us for a user name and password