1. 切到 root 用户
su root
2. 编辑 sudoers 文件
vim /etc/sudoers
3. 将 jhin 加入到 sudoers 中
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
jhin ALL=(ALL) ALL
4. 强制保存并退出
:x!
参考:
http://blog.csdn.net/wenxuechaozhe/article/details/69092769
P.S.
部分文件翻译 (欢迎补充翻译)
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
## Sudoers 允许特定用户像 root 用户一样运行各种命令,而不需要 root 用户的密码。
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
## 在文件的底部提供了相关命令集合的示例,然后可以将其委托给特定的用户或组。
##
## This file must be edited with the 'visudo' command.
## 这个文件只能通过 visudo 命名进行编辑
## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhaps using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias FILESERVERS = fs1, fs2
# Host_Alias MAILSERVERS = smtp, smtp2
## 主机别名
## 机器组,你或许更喜欢使用主机名(可能使用通配符整个域) 或者 IP 地址代替
## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem
## 用户别名
## 这个通常不是必须的,因为你可以使用常规组
## (ie, 文件, 轻量目录访问协议, NIS 目录访问技术, 等等) 在这个文件中 - 仅用 %groupname
## Command Aliases
## These are groups of related commands...
## 命令别名
## 这些都是组相关的命令