centos添加用户并赋予root权限

开始试过很多次通过加入wheel这个group来赋予普通用户root权限,但是都失败了。后来看了下面的帖子才搞定。/etc/sudoers这个文件下找到 ## Allow root to run any commands anywhere ,在这里添加和 root ALL=(ALL) ALL 相似的命令行即可

https://www.yundashi168.com/articles/2019/04/02/1554195417834.html

即这篇文章里的方法二: https://blog.csdn.net/yeizisn/article/details/53300991

发表评论