Debian10中sudo配置

Debian10中/etc/sudoers中提示了需要通过visudo来编辑该文件,如下: This file MUST be edited with the ‘visudo’ command as root. 但奇葩的是系统中没有visudo命令,apt搜索也搜不到,-_-! 解决方法为,先使用su切换至root用户,然后apt install sudo安装sudo 然后编辑/etc/sudoers,加入以下内容,保存时使用wq!强制保存即可。 username ALL=(ALL:ALL) ALL 或者使用echo直接写入到/etc/sudoers中。 #echo "username ALL=(ALL:ALL) ALL" >> /etc/sudoers 接下来就可以使用sudo命令来进行root权限操作了。

七月 10, 2019 · JQX