ѧϰ²Î¿¼¡£
Ò»¸ö¼òµ¥µÄÏÞʱµÇ¼·½·¨:дÈý¸ö shell ³ÌÐò£¬µ÷Óà at ºÍϵͳά»¤¹¦ÄÜ:
1. ÔÚÖ¸¶¨µÄʱ¼äÖ´ÐиÃshell£¬ÔÚ/etcÏÂÉú³ÉÒ»ÃûΪnologinµÄÎļþ£¬È磺
vi /sbin/login.denied
echo " Login Denied " > /etc/nologin
chmod 700 login.denied
2. ÔÚÖ¸¶¨µÄʱ¼äÖ´ÐиÃshell£¬É¾³ý/etc/ϵÄnologinÎļþ£¬È磺
vi /sbin/login.allowed
if [ -f /etc/nologin ]; then
rm /etc/nologin
fi
chmod 700 login.allowed
3. ±àдһ¸öÏÞÖÆʱ¼äµÄshell£¬È磺
vi /sbin/security
if [ -f /sbin/login.denied ]; then
at -f /sbin/login.denid 22:00
fi
if [ -f /sbin/login.allowed ]; then
at -f /sbin/login.allowed 8:00
if
´ËÖÖÉèÖõŦÄÜÊÇ£º´ÓÍíÉÏ10:00 µ½µÚ¶þÌìÔçÉÏ 8:00 ½ûÖ¹·Ç root Óû§µÇ¼£¬ÏÔʾΪϵͳά»¤×´Ì¬¡£
ÁíÍ⣬»¹Ðè¶Ô root Óû§µÄµÇ¼Öն˽øÐÐÏÞÖÆ£¬×îºÃÉèÖÃÔÚ console£¬ÔÚ /etc/security/access.confÖÐÅäÖÃ
-:root:ALL EXCEPT console
¾Í¿ÉÒÔÁË¡£
vipdon ÓÚ 2015-08-02 21:36:39·¢±í:
Õ渴ÔÓ
yinbingneed1103 ÓÚ 2015-03-03 13:26:44·¢±í:
ѧϰÁË
leolindaming ÓÚ 2014-12-27 20:30:49·¢±í:
ѧϰÁË