adduser test
passwd test
根据提示输入两次密码
配置/etc/sudoers文件即可,过程如下
chmod u+w /etc/sudoers echo "gc-user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers chmod u-w /etc/sudoers