首页 > 其他 > 网站日记>正文

Centos下普通用户设置sudo权限

提示: 阅读权限:公开  
centos7下使用CutyCapt将html转成图片
https://blog.csdn.net/qq_31617637/article/details/83274178已按此方面安装CutyCapt

https://blog.csdn.net/bizu005/article/details/84025569?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task
https://blog.csdn.net/weixin_44705683/article/details/104413090

1.测试结果:

<br />
<b>Warning</b>:  exec() has been disabled for security reasons in <b>/www/wwwroot/w.755.kim/1.php</b> on line <b>6</b><br />
Array
(
)
<img src="http://39.105.177.79/d/zhongyf.jpg">

处理方法: 解禁 exec函数

2.测试结果
Array
(
    [0] => 
    [1] => We trust you have received the usual lecture from the local System
    [2] => Administrator. It usually boils down to these three things:
    [3] => 
    [4] =>     #1) Respect the privacy of others.
    [5] =>     #2) Think before you type.
    [6] =>     #3) With great power comes great responsibility.
    [7] => 
    [8] => sudo: no tty present and no askpass program specified
)
截图失败1

处理方法: 权限不足


Centos下普通用户设置sudo权限


# 首先切换为root用户
su root
 
# 修改sudoers文件
vim /etc/sudoers
 
# 找到权限设置,如下
root    ALL=(ALL)       ALL
 
# 若要给www用户增加sudo权限,需要增加如下一行
root    ALL=(ALL)       ALL
violet    ALL=(ALL)       ALL
www     ALL=(ALL)   NOPASSWD: ALL
 
# 保存退出后violet用户则拥有了sudo权限
  
 

上一篇:指定栏目下的信息随机调用高效代码

下一篇:帝国cms函数大全索引

tags: Centos 用户 设置 权限

返回首页

相关

热门

站内直通车

[!--temp.bottomnav--]
返回顶部