一个简单shell,不按套路来,谁帮看一下
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#!/bin/bashexeuser=workeruserid=`id -nu`if [ "$userid"!="$exeuser" ];then echo "only user:worker can execuce" <i style="color:transparent">本#文来源gaodai$ma#com搞$$代**码网$</i><button>搞代gaodaima码</button> exit;fi
一个脚本,有时忘了,用root就执行了,所以脚本加了一个判断 ,可不知道为什么,if总返回真
——解决方案——————–
用worker用户执行就不会返回true,我试过了, linux as4 。。