普通用户提权

版权声明:hanxinkong提供技术支持 https://blog.csdn.net/hanxinkong/article/details/83833167

修改 /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

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/hanxinkong/article/details/83833167