1.創建用戶
useradd test01
2.為用戶創建創建密碼
passwd test01
3.為普通用戶賦予sudo權限
① 使用root用戶登錄系統,首先修改文件/etc/sudoers的寫權限(默認為只讀,增加寫的權限)
`chmod 640 /etc/sudoers`
② 使用vim編輯文件/etc/sudoers
`vim /etc/sudoers`
③ 在root后面增加用戶名和ALL
`## Allow root to run any commands anywhere
root ALL=(ALL) ALL
test01 ALL=(ALL) ALL
`
④ wq保存,並將/etc/sudoers改為只讀
`chmod 440 /etc/sudoers`