如何在centos下创建新用户名和密码


当前第2页 返回上一页

1

2

3

## Allow root to run any commands anywhere

root ALL=(ALL) ALL

prefma ALL=(ALL) ALL #这个是新用户

然后输入命令 wq! 保存修改。

3、收回权限

1

2

[root@localhost~]# chmod -v u-w /etc/sudoers

mode of ‘/etc/sudoers’ changed from 0640 (rw-r-----) to 0440 (r--r-----)

4、新用户登录

新建连接,使用新创建的用户登录,并进行验证,比如:

1

2

3

4

[prefma@localhost~]$ pwd

/home/prefma

[prefma@localhost~]$ ls -l /etc/sudoers

-r--r----- 1 root root 3995 Oct 16 22:42 /etc/sudoers

相关参考:centOS教程

以上就是如何在centos下创建新用户名和密码的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

CentOS网络连接不上如何解决

CentOS系统启动tomcat提示权限不够

CentOS系统启动流程是什么

CentOS系统如何设置显示器不休眠

CentOS如何开启php错误日志

tomcat在CentOS下出现中文乱码怎么办

如何解决CentOS无法识别usb

CentOS出现ssh登录失败怎么办

CentOS 下搭建ftp服务器

CentOS安装mysql报错了怎么办

更多相关阅读请进入《CentOS》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...