linux系统给普通用户添加sudo权限

linux下直接运行sudo命令,会提示类似:
jiang is not in the sudoers file. This incident will be reported.
这里,jiang是用户名称,然后导致无法执行sudo命令,这时候,如下解决:
编辑/etc/sudoers文件。也就是输入命令"vim /etc/sudoers",进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"jiangs ALL=(ALL) ALL"(这里的jiangs是你的用户名),然后保存退出。

posted on 2018-03-02 11:40  叶少翔  阅读(136)  评论(0编辑  收藏  举报

导航