CentOS 7 添加用户
2019-12-18 本文已影响0人
iCherries
一、新建用户并设置密码
adduser name1
passwd name1
Changing password for user name1.
New password: # 输入密码
Retype new password: # 再次输入密码
passwd: all authentication tokens updated successfully
二、授权
chmod u+w /etc/sudoers # 获取修改文件权限
vi /etc/sudoers # 修改文件使用户具有root权限
## Allow root to run any commands anywhere #找到这一行
root ALL=(ALL) ALL
username ALL=(ALL) ALL # 加入内容,使得username 具有root权限