1、创建用户
useradd querylog
2、设置密码
passwd queylog
3、授权sudo权限
查找sudoers文件位置 whereis sudoers
查看权限 ls -l /etc/sudoers
修改文件为可编辑 chmod -v u+w /etc/sudoers
编辑文件 vim /etc/sudoers
收回权限 chmod -v u-w /etc/sudoers
查看权限 ls -l /etc/sudoers
第一次使用sudo会有提示
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
到此用户创建完成。