1.切换至root用户 # visudo 2.在一般模式下 /root ------> 回车 -------> n (3次) 添加: tom ALL=(root) NOPASSWD:ALL 3.保存退出