没有GUI工具可以完成这一件事情。
首先使用sudo visudo
,然后向文件中间添加
your_user_name ALL=(ALL) NOPASSWD:ALL
然后执行命令
sudo passwd -d `whoami`
参考原文
You can't do that using the GUI tool, but you can using the terminal.
- First, if your user has sudo privileges, you must enable its NOPASSWD option. Otherwise, sudo will ask for a password even when you don't have one, and won't accept an empty password.To do so, open the sudoers configuration file with
sudo visudo
, and add the following line to the file, replacing david with your username:
david ALL=(ALL) NOPASSWD:ALL
Close the editor to apply the changes, and test the effect on sudo in a new terminal.
- Delete the password for your user by running this command:
sudo passwd -d `whoami`
网友评论