su - -c “mkdir /tmp/file” 用户名
yum install -y sudo 安装
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
test 192.168.8.1/24=(root) NOPASSWD:/bin/ls,/usr/bin/passwd
test1 ALL=(root) /bin/ls,/usr/bin/passwd
原文:http://hiyang.blog.51cto.com/10728919/1762438