內容來源自網絡linux
ssh root@server_ip_address網絡
adduser usernamessh
passwd username
輸入兩次密碼server
usermod -aG wheel usernameip
%wheel ALL=(ALL) ALL登錄
userdel username權限
chmod u+w /etc/sudoers密碼
root ALL=(ALL) ALL
在該行下面添加:
username ALL=(ALL) ALL文件
chmod u-w /etc/sudoerssudo
方案一和方案二不可以混合使用,混合使用反而達不到效果