增加sudo權限
推薦方案
當新增一個用戶時使用su sudo
會出現xxx is not in the sudoers file
,可以通過更改/etc/sudoers文件來進行解決,但是請不要更改/etc/sudoers
權限,更改後再修改權限回來這種方式進行操作,而是需要使用visudo來進行操作。
操作方法
執行visudo語句後找到Allow root ...
並在後面加入用戶即可
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
xxx ALL=(ALL) ALL