美文网首页
CentOS添加新用户

CentOS添加新用户

作者: 半个茄子 | 来源:发表于2019-03-30 17:34 被阅读0次

1. 创建新用户newbirds


$ adduser newbirds

2. 设置密码


$ passwd newbirds

3. 为新用户授root权限


查找权限配置文件
$ whereis sudoers
查看权限文件的状态
$ ls -l /etc/sudoers

会发现为只读状态
需要修改文件状态为可读可写


$ chmod -v u+w /etc/sudoers

然后修改文件:


$ vim /etc/sudoers

在root ALL=(ALL) ALL下加入新的用户newbirds



保存后,解除文件写权限


$ chmod -v u-w /etc/sudoers

\color{rgb(255,0,5,.4)}{欢迎赞赏支持!}

相关文章

网友评论

      本文标题:CentOS添加新用户

      本文链接:https://www.haomeiwen.com/subject/hkjsbqtx.html