debian 普通用户无密码升权ROOT。

先切到ROOT帐号

然后打开 sudoers 文件:nano /etc/sudoers

然后找到 # Allow members of group sudo to execute any command,在 %sudo ALL=(ALL:ALL) ALL 下面添加 xxx ALL=(ALL:ALL) ALL,xxx 为前面无法执行 sudo 命令的用户名。注:按Ctrl+W后输入”Allow members”后回车进行搜索,添加完后按提示依次按下Ctrl+X、Y、Ctrl+M保存修改并退出。

这样对应的用户可以直接用sudo -i进行转成root帐户。