ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÁÙʱ½ûÖ¹Ò»¸öÓû§

·¢²¼Ê±¼ä:2006-01-12 11:14:08À´Ô´:ºìÁª×÷Õß:wide
ÓÐʱÐèÒªÁÙʱ½ûÖ¹Ò»¸öÓû§£¬¶ø²»É¾³ýËü¡£ÀýÈçÓû§Ã»Óи¶·Ñ£¬»òϵͳ¹ÜÀíÔ±»³Òɺڿ͵õ½ÁËij¸öÕÊ»§µÄ¿ÚÁî¡£

½ûÖ¹Ò»¸öÓû§µÄ×îºÃ·½·¨Êǽ«ËüµÄshell±äµ½Ò»¸öÌض¨µÄÖ»´òÓ¡³öÒ»ÌõÐÅÏ¢µÄ³ÌÐò£¬ÓÃÕâÖÖ·½·¨£¬ÈκÎÏëµÇ¼´ËÕÊ»§µÄÈ˽«ÎÞ·¨µÇ¼£¬²¢µÃÖªÔ­Òò¡£¸ÃÐÅÏ¢¿ÉÒÔ¸æËßÓû§Óëϵͳ¹ÜÀíÔ±ÁªÏµ£¬ÒÔ´¦ÀíÈκÎÎÊÌâ¡£

Ò²¿ÉÒԸıäÓû§Ãû»ò¿ÚÁµ«ÕâÑùÓû§²»ÖªµÀÔõô»ØÊ¡£ Confused users mean more work.

²úÉúÉÏÊöÌض¨³ÌÐòµÄÒ»¸ö¼òµ¥·½·¨ÊÇд"tail scripts":

#!/usr/bin/tail +2
This account has been closed due to a security breach.
Please call 555-1234 and wait for the men in black to arrive.
Ç°2¸ö×Ö·û("#!")¸æËߺËÐı¾ÐеÄÆäËû²¿·ÖÊǽâÊͱ¾ÎļþÒªÔËÐеÄÃüÁî¡£ÕâÑùtail ÃüÁÊä³ö´¦ÀíµÚÒ»ÐÐÍâµÄËùÓж«Î÷µ½±ê×¼Êä³ö¡£
Èç¹û»³ÒÉbillgÊǸö°²È«È±¿Ú£¬ÏµÍ³¹ÜÀíÔ±¿ÉÒÔÕâÑù×ö£º

# chsh -s /usr/local/lib/no-login/security billg
# su - tester
This account has been closed due to a security breach.
Please call 555-1234 and wait for the men in black to arrive.
#
su µÄÄ¿µÄÊÇ´Ëʱ¸Ä±äÊÇ·ñ¹¤×÷¡£
Tail scriptsÓ¦¸Ã·ÅÔÚÒ»¸ö·ÖÀëµÄĿ¼ÖУ¬ÕâÑùËüÃǵÄÃû×Ö²»»á¸ÉÈÅÆÕͨÓû§µÄÃüÁî¡£

ÔÚ±ðµÄÍøÕ¾¿´µ½µÄ£¬²»ÖªÓÐûÓÐЧ£¬ÓÐÐËȤµÄÅóÓÑ¿ÉÒÔÊÔÊÔÏ¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ