Chinaunix首页 | 论坛 | 博客
  • 博客访问: 47135
  • 博文数量: 21
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 100
  • 用 户 组: 普通用户
  • 注册时间: 2014-03-18 23:10
个人简介

A lot of water under the bridge.

文章分类

全部博文(21)

分类: LINUX

2014-03-20 12:38:34

//Situation
    System prompts "xxx is not in the sudoers file"(xxx equals the user name) while executing command "sudo":
 

  1. sudo -i
  2. Password:
  3. xxx is not in the sudoers file. This incident will be reported.


//Analysis
    The current account must have no rights to execute "sudo".

//Solution
To fix the problem, add the current account into the file  "/etc/sudoers":
    1. Switch to supervisor:    su
    2. Open the file "sudoers" with vi editor:    vi /etc/sudoers

    3. Add the account:    press "i" to edit; find line "root    ALL=(ALL)    ALL"; new a line "xxx    ALL=(ALL)    ALL" below it; save&quit with the command "wq!".

Problem solved.

阅读(606) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~