su -chmod u+w /etc/sudoersvisudo (或 vim /etc/sudoers),在 root ALL=(ALL) ALL 下新增:username ALL=(ALL) ALL (username 為目標帳號)chmod u-w /etc/sudoers最佳實務: 建議直接使用 visudo (內建語法檢查、鎖定防衝突),無需手動 chmod。若需免密碼 sudo,改為 username ALL=(ALL) NOPASSWD:ALL。授權後該使用者可執行 sudo 指令 取得 root 權限。