centos7 创建用户并加入管理权限

2017-10-18  本文已影响62人  Nannn_楠

一直都听说不推荐直接使用root用户登录使用linux,但是不知道为什么,后面查了一下主要两个点:
1.容易误操作,例如 rm -rf /
2.如果是root用户运行的程序被攻击了黑客就能获取root权限去操作

那么一般都是创建一个有管理权限的账户来使用.

[root@xxxxx /]# adduser simple    //创建用户
[root@xxxxx /]# passwd simple     //设置密码
Changing password for user simple.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@xxxxx /]# usermod -a -G wheel simple    //加入权限组

上一篇下一篇

猜你喜欢

热点阅读