一、根据PID过滤进程所有信息spanstylefontsize:lineheight:color:rgb(91,218,237);overflowwrap:inherit!wordbreak:inherit!!binbashspan spanstylefontsize:lineheight:color:rgb(128,128,128);overflowwrap:inherit!wordbreak:inherit!Function:根据用户输入的PID,过滤出该PID所有的信息span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!请输入要查询的PID:spanP npsauxawkspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!{print11}spanwcl spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!nspaneq0〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该PID不存在!!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!exitspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程PID:spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspanspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程命令:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!11span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程所属用户:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!1span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!CPU占用率:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!3span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!内存占用率:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!4span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程开始运行的时刻:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!9span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程运行的时间:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!10span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程状态:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!8span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程虚拟内存:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!5span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程共享内存:psauxawkspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Pspan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!6span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span 二、根据进程名过滤进程信息 会显示出该进程名包含的所有线程spanstylefontsize:lineheight:color:rgb(91,218,237);overflowwrap:inherit!wordbreak:inherit!!binbashspan spanstylefontsize:lineheight:color:rgb(128,128,128);overflowwrap:inherit!wordbreak:inherit!Function:根据输入的程序的名字过滤出所对应的PID,并显示出详细信息,如果有几个PID,则全部显示span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!请输入要查询的进程名:spanNAME Npsauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepwclspanstylefontsize:lineheight:color:rgb(128,128,128);overflowwrap:inherit!wordbreak:inherit!统计进程总数span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Nspanle0〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该进程名没有运行!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan i1 spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!whilespan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Nspangt0〕 spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!dospan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程PID:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!2span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程命令:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!11span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程所属用户:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!1span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!CPU占用率:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!3span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!内存占用率:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!4span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程开始运行的时刻:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!9span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程运行的时间:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!11span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程状态:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!8span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程虚拟内存:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!5span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!进程共享内存:psauxgrepspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!NAMEspangrepvgrepawkNRspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispan{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!0span}awk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!6span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!letspanNi spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!donespan 三、根据用户名查询该用户的相关信息spanstylefontsize:lineheight:color:rgb(91,218,237);overflowwrap:inherit!wordbreak:inherit!!binbashspan spanstylefontsize:lineheight:color:rgb(128,128,128);overflowwrap:inherit!wordbreak:inherit!Function:根据用户名查询该用户的所有信息span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!请输入要查询的用户名:spanA spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span ncatetcpasswdawkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!1spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!{print}spanwcl spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!nspaneq0〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户不存在span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!elsespan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户的用户名:spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspanspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户的UID:catetcpasswdawkF:spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!1spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspan{print}awkF:{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!3span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户的组为:idspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspanawk{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!3span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户的GID为:catetcpasswdawkF:spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!1spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspan{print}awkF:{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!4span}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户的家目录为:catetcpasswdawkF:spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!1spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspan{print}awkF:{printspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!6span}span LogincatetcpasswdawkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!1spanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!{print}spanawkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!{print7}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Loginspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!binbashspan〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户有登录系统的权限!!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!elifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Loginspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!sbinnologinspan〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!该用户没有登录系统的权限!!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan 四、加固系统的一些配置spanstylefontsize:lineheight:color:rgb(91,218,237);overflowwrap:inherit!wordbreak:inherit!!binbashspan spanstylefontsize:lineheight:color:rgb(128,128,128);overflowwrap:inherit!wordbreak:inherit!Function:对账户的密码的一些加固span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!设置密码最多可多少天不修改:spanA spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!设置密码修改之间最小的天数:spanB spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!设置密码最短的长度:spanC spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!设置密码失效前多少天通知用户:spanD sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!PASSMAXDAYScPASSMAXDAYSspanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Aspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!spanetclogin。defs sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!PASSMINDAYScPASSMINDAYSspanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Bspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!spanetclogin。defs sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!PASSMINLENcPASSMINLENspanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Cspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!spanetclogin。defs sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!PASSWARNAGEcPASSWARNAGEspanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Dspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!spanetclogin。defs spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!已对密码进行加固,新用户不得和旧密码相同,且新密码必须同时包含数字、小写字母,大写字母!!span sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!pampwquality。socpasswordrequisitepampwquality。sotryfirstpasslocalusersonlyretry3authtoktypedifok1minlen8ucredit1lcredit1dcredit1spanetcpam。dsystemauth spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!已对密码进行加固,如果输入错误密码超过3次,则锁定账户!!span ncatetcpam。dsshdgrepspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!authrequiredpamtally2。sospanwcl spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!nspaneq0〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!PAM1。0aauthrequiredpamtally2。sodeny3unlocktime150evendenyrootrootunlocktime300spanetcpam。dsshd spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!已设置禁止root用户远程登录!!span sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!PermitRootLogincPermitRootLoginnospanetcsshsshdconfig spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!设置历史命令保存条数:spanE spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!设置账户自动注销时间:spanF sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!HISTSIZEcHISTSIZEspanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Espanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!spanetcprofile sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!HISTSIZEaTMOUTspanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Fspanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!spanetcprofile spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!已设置只允许wheel组的用户可以使用su命令切换到root用户!span sedispanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!pamwheel。souseuidcauthrequiredpamwheel。souseuidspanetcpam。dsu ncatetclogin。defsgrepSUWHEELONLYwcl spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!nspaneq0〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanSUWHEELONLYyesetclogin。defs spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!即将对系统中的账户进行检查。。。。span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!系统中有登录权限的用户有:span awkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!(7binbash){print1}spanetcpasswd spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!系统中UID0的用户有:span awkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!(30){print1}spanetcpasswd spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span NawkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!(2){print1}spanetcshadowwcl spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!系统中空密码用户有:spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Nspanspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Nspaneq0〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!恭喜你,系统中无空密码用户!!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!elsespan i1 spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!whilespan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Nspangt0〕 spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!dospan NoneawkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!(2){print1}spanetcshadowawkspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!NRspanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!{print}span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Nonespan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!必须为空用户设置密码!!span passwdspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Nonespan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!letspanN spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!donespan MawkF:spanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!(2){print1}spanetcshadowwcl spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!ifspan〔spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Mspaneq0〕;spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!thenspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!恭喜,系统中已经没有空密码用户了!span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!elsespan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!系统中还存在空密码用户:spanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!Mspanspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!fispan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!即将对系统中重要文件进行锁定,锁定后将无法添加删除用户和组span spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!readspanpspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!警告:此脚本运行后将无法添加删除用户和组!!确定输入Y,取消输入N;YN:spani spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!casespanspanstylefontsize:lineheight:color:rgb(98,151,85);overflowwrap:inherit!wordbreak:inherit!ispanspanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!inspan 〔Y,y〕) chattrietcpasswd chattrietcshadow chattrietcgroup chattrietcgshadow spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!锁定成功!span ;; 〔N,n〕) chattrietcpasswd chattrietcshadow chattrietcgroup chattrietcgshadow spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!取消锁定成功!!span ;; ) spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!echospanspanstylefontsize:lineheight:color:rgb(238,220,112);overflowwrap:inherit!wordbreak:inherit!请输入YyorNnspan spanstylefontsize:lineheight:color:rgb(248,35,117);overflowwrap:inherit!wordbreak:inherit!esacspan 原作者:已注销 源链接: https:blog。csdn。netlysharklysharkarticledetails125853245 编辑:IT运维技术圈 小编有话说 推荐服务: 向下滑动查看更多 点击【IT面试精选】查看全网最权威的一线大厂面试真题及面试经验,每天更新哦! 点击【IT路边社】查看实时更新的IT新闻资讯 点击【2022互联网大事件盘点】查看2022互联网最全大事件盘点 回复【加群】群满啦!添加波哥微信拉您进群! 点击【安全加固】获取最新安全加固脚本 点击【一键iptables脚本】获取iptables自动设置脚本