添加有root權限的用戶
=====
# 新建用戶
adduser [用戶名]
```shell
adduser uuuu
```
# 設置密碼
passwd [用戶名]
```shell
passwd uuuu
```
# 賦予root權限
```shell
sudo vim /etc/sudoers
```
修改 /etc/sudoers 文件,找到下面一行,在root下面添加一行,如下所示:
```
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
```
新建用戶的名字 ALL=(ALL) ALL
假如我添加的用戶是`uuuu`
```
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
uuuu ALL=(ALL) ALL
```
修改完畢,現在可以用新建的用戶名字帳號登錄,然后用命令 su -,即可獲得root權限進行操作。