1. 新建用户
[root@ldy ~]# adduser lidengyin
[root@ldy ~]# passwd lidengyin
Changing password for user lidengyin.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
  1. 为lidengyin用户添加sudo权限
[root@ldy ~]# vim /etc/sudoers
  1. 把root那行复制后改成lidengyin

lidengyin就有了sudo权限,需要sudo密码则为ALL

## Allow root to run any commands anywhere 
root ALL=(ALL) ALL
lidengyin ALL=(ALL)