创建用户并设置密码

Text
#创建账号 
adduser test
#设置密码
passwd test

授权

Text
#添加授权管理文件的写入权限
chmod u+w /etc/sudoers

# 编辑授权管理文件
vim /etc/sudoers

#在root    ALL=(ALL)       ALL 下方添加
test    ALL=(ALL)       ALL

#保存退出后除去授权管理文件的写权限
chmod u-w /etc/sudoers