解决方案0:
用shell完全可以解决,如果有tcpwrapper的系统,可以直接加/etc/hosts.deny
解决方案1:
在/etc/profile里加一段shell就可以了(sco openserver)
这是我写的只要求本C段登陆的shell,改改就可以了.
who=`who am i|awk '{print $1}'`
myterm=`who am i|awk '{print substr($2,4,2)}'`
if [ "x"$who = "xroot" ]
then
subnet=`finger|grep $myterm|awk '{print substr($8,1,8)}'`
else
subnet=`finger|grep $myterm|awk '{print substr($7,1,8)}'`
fi
test x$subnet != x && test x$who != xroot && test "x"$subnet != "x46.8.44." &&
echo " Please login from local network
" && exit