is not in the sudoers file 解决

解决方案:
首需要切换到root身份
$su –
(注意有- ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用”su -“命令将环境变量也一起带过去,就象和root登录一样)

然后
$visudo     //切记,此处没有vi和sudo之间没有空格

1、移动光标,到最后一行
2、按a,进入append模式
3、输入
your_user_name ALL=(ALL)  ALL
4、按Esc
5、输入“:w”(保存文件)
6、输入“:q”(退出)

这样就把自己加入了sudo组,可以使用sudo命令了。

3 Responses so far.

  1. quest bars says:
    Thanks in support of sharing such a good opinion, paragraph is good, thats why i have read it completely
  2. Quest Bars says:
    Thanks , I have recently been searching for info about this topic for
    a while and yours is the best I have discovered till now. But, what
    about the bottom line? Are you positive in regards to
    the source?
  3. Great – I should certainly pronounce, impressed with your web site. I had no trouble navigating through all the tabs and related information ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or anything, site theme . a tones way for your client to communicate. Nice task.

Leave a Reply to Bernard Tschetter Cancel reply