useradd [username]
passwd [username]
chmod u+w /etc/sudoers
vim /etc/sudoers
可以sudoers添加下面四行中任意一条
username ALL=(ALL) NOPASSWD:ALL
%groupname ALL=(ALL) ALL
# NOPASSWD: 免密
原文:https://www.cnblogs.com/zhushenghao/p/11475761.html