su rootchmod u+w /etc/sudoers 增加write权限vi sudoers 找到root ALL=(ALL) ALL,后面加入”username” ALL=(ALL) ALLchmod u+w /etc/sudoers 删除write权限 it worked for centos with my test