[root@ localhost shell]# vim s5.sh #!/bin/bash name=`whoami` echo $name if [ $name -ne "root" ];then echo "对不起,您不是管理员" else yum -y install vsftpd fi