Translating by ZTinoZ

This commit is contained in:
ZTinoZ 2014-12-26 15:56:59 +08:00
parent 4d1008437a
commit 4ca1c3dc87

View File

@ -2,13 +2,13 @@ Linux有问必答时间--怎样解决“XXX is not in the sudoers file”错误
================================================================================
> **问题**:我想在我的Linux系统上使用sudo来运行一些特权命令然而当我试图这么做时我却得到了"[我的用户ID] is not in the sudoers file. This incident will be reported."的错误信息。我该怎么处理这种sudo错误呢
sudo是一个允许特定的用户组用另一个用户(典型的代表是root)的特权来运行一个命令。sudo有详细的日志功能并且提供了细粒度控制 comes with detailed logging capability, and offers finer granular control over which user can type what commands via sudo.
sudo是一个允许特定的用户组用另一个用户(典型的代表是root)的特权来运行一个命令。sudo有详细的日志功能并且提供了细粒度控制来覆盖用户通过sudo敲入的命令。
### Sudo vs. Su ###
su命令也提供了同样的特权升级功能两者不同的是它们认证过程和特权变化的粒度。su allows you to switch your login session to another user's, where you can then run any arbitrary programs with the user's privilege as many times as you want. You will have to know the target user's password to switch to the user though. On the other hand, sudo works on a per-command basis, allowing you to run a single command with root privilege. To use sudo, you don't have to know the root password, but enter your own password at sudo password prompt.
su命令也提供了同样的特权升级功能两者不同的是它们认证过程和特权变化的粒度。su允许你从你的登录会话切换到另一个用户的会话然后你可以随心所欲地用该用户的特权来运行任何程序但是你需要知道目标用户的密码才能切换这个用户。另一方面sudo能在每个命令的基础上工作允许你用root的特权来运行单个命令。用sudo你不必一定要知道root的密码但是在提示输入sudo密码的时候要输入你的密码。
### Add a User to Sudoers List ###
### 在Sudoers列表里添加用户 ###
As a new user, if you attempt to run sudo command, you will encounter the following error. This means that you are not in the sudoers list which contains a group of users who are authorized to use sudo.