免密sudo su

1.添加文件 /etc/sudoers.d/wsy_sudoers

%wsy-sudoers ALL=(ALL:ALL) NOPASSWD:ALL

2.添加用户组

groupadd wsy-sudoers

3.添加用户到group wsy-sudoers

usermod -aG wsy-sudoers wangshuyi

原文地址:https://www.cnblogs.com/wangshuyi/p/9865781.html