因为各种原因,你可能不想让某个用户登陆在系统上,下面的脚本可以帮助你实现这个愿望: [root@foo/]#whiletrue>do>kill-9$(ps-aux|grepusername|awk{print$2})>sleep2>done