sudo无需输入密码设置

1 在终端输入: sudo gedit /etc/sudoers

2 在打开文件中的root   ALL=(ALL:ALL) ALL下一行添加"自己用户名字 ALL=(ALL) ALL",例如用户名是Tom,则添加:Tom  ALL=(ALL)  ALL

3 在最后一行添加:Tom  ALL=(ALL)NOPASSWD:ALL

参考:https://www.cnblogs.com/wanghuixi/p/7513780.html

猜你喜欢

转载自www.cnblogs.com/xxswkl/p/11109631.html