一、创建普通用户
1. 创建普通用户
useradd
[root@VM_0_17_centos ~]# useradd user0
2. 为普通用户设置密码
passwd
[root@VM_0_17_centos ~]# passwd user0
Changing password for user user0.
New password:
BAD PASSWORD: The password fails the dictionary check - it is too simplistic/systematic
Retype new password:
passwd: all authentication tokens updated successfully.
二、编辑 /etc/sudoers
visudo
修改内容:
user0 ALL=(ALL) ALL
完整配置文件内容:
[root@VM_0_17_centos ~]# cat /etc/sudoers
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited