CentOS赋予用户使用sudo等命令的权利

CentOS赋予用户使用sudo等命令的权利

1. 取得root权限

su root

2. 编辑sudoers文件

命令:visudo或者vi /etc/sudoers

3. 为用户添加root所有权限

## Next comes the main part: which users can run what software on

## which machines (the sudoers file can be shared between multiple

## systems).

## Syntax:

##

##      user    MACHINE=COMMANDS

##

## The COMMANDS section may have other options added to it.

##

## Allow root to run any commands anywhere

root    ALL=(ALL)       ALL

在此之后添加一行代码:ting    ALL=(ALL)       ALL


猜你喜欢

转载自jarg.iteye.com/blog/1684457