[CentOS] permission script

Eugeneapolinary Ju

eugeneapolinary81 at yahoo.com
Sun Oct 25 16:42:17 UTC 2009


I just wrote a little script, that will echo a message to the user, if it doesn't have enough permission:



$ if ! [ "$(env LC_MESSAGES=C ifconfig wlan0 down | grep -i denied)" == "" ]; then echo "no permission"; fi

SIOCSIFFLAGS: Permission denied

$ sudo su

[sudo] password for USER: 

# if ! [ "$(env LC_MESSAGES=C ifconfig wlan0 down | grep -i denied)" == "" ]; then echo "no permission"; fi

# 



but it won't works



why?




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20091025/b6249964/attachment.html>


More information about the CentOS mailing list