#!/bin/bash
#AUtor : gaohuina
#date: 2011-01-14
#DESC :
#!/bin/bash
read -p "please input a username :" MYUSER
 cut -d: -f1 /etc/passwd | grep "^$MYUSER" &> /dev/null || exit4
let COUNT=`who | grep "$MYUSER"| wc -l`
until [ $COUNT -ge 4 ];do
sleep 5
let COUNT=`who | grep "$MYUSER"| wc -l`
done
echo "the $MYUSER login times is 4:"