用root帐号登录或者su到root。
增加sudoers文件的写权限:
chmod u+w /etc/sudoers
vim /etc/sudoers
找到root ALL=(ALL) ALL
在这行下边添加username ALL=(ALL) ALL
(username代表是你要添加sudo权限的用户名)除去sudoers文件的写权限: chmod u-w /etc/sudoers
用root帐号登录或者su到root。
增加sudoers文件的写权限: chmod u+w /etc/sudoers
vim /etc/sudoers
找到 root ALL=(ALL) ALL
在这行下边添加 username ALL=(ALL) ALL
(username代表是你要添加sudo权限的用户名)
除去sudoers文件的写权限: chmod u-w /etc/sudoers