首页 > 其他 > 详细

Centos7服务器添加新用户

时间:2019-03-12 20:36:53      阅读:204      评论:0      收藏:0      [点我收藏+]

添加新用户
[root@localhost etc]# adduser jiangshan
[root@localhost etc]# passwd jiangshan
[root@localhost etc]# chmod -v u+w sudoers
mode of ‘sudoers’ changed from 0440 (r--r-----) to 0640 (rw-r-----)
[root@localhost etc]# vim /etc/sudoers
在root ALL=(ALL) ALL行后,添加以下行
[用户名] ALL=(ALL) ALL(如需新用户使用sudo时不用输密码,把最后一个ALL改为NOPASSWD:ALL即可)
[root@localhost etc]# chmod -v u-w sudoers
mode of ‘sudoers’ changed from 0640 (rw-r-----) to 0440 (r--r-----)

Centos7服务器添加新用户

原文:https://www.cnblogs.com/jeshy/p/10519391.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!