1. 程式人生 > >普通使用者提權

普通使用者提權

修改 /etc/sudoers 檔案

$ vim /etc/sudoers 


## Allows people in group wheel to run all commands 
%wheel ALL=(ALL) ALL

修改使用者屬於root組

#usermod -g root tommy

修改 /etc/sudoers

## Allow root to run any commands anywhere 
root ALL=(ALL) ALL 
tommy ALL=(ALL) ALL

修改 /etc/passwd

使用者ID修改為 0

# vim /etc/passwd


hadoop:x:0:1003:richard:/data/webroot:/bin/bash

在這裡插入圖片描述