问题描述:

  新建用户执行命令sudo chmod 700 ,提示输入root命令. 输入三次错误. 提示 yourid is not in the sudoers file. This incident will be reported

问题解决

  more /etc/sudoers

  增加用户

  root    ALL=(ALL)     ALL
  liuyuxing  ALL=(ALL)    ALL 这样你的用户就可以使用所有的命令了,但是每次使用之前要输入自己的密码.


****

区别

  sudo -i 是切换到root 用   包含环境变量的

  su root 也是切换到root 用户  临时的

  sudo 命令  是让当前用户有使用某个命令的权限.

posted on 2016-01-05 10:57  任城三爷  阅读(163)  评论(0编辑  收藏  举报