How do I logon as root in debian11?

1,585次阅读
尚無留言

共计 351 个字符,预计需要花费 1 分钟才能阅读完成。

啟用 Debian 11 root 登陸還真的是需要點耐心

點擊下載 debian 11.2.0 amd64 BD ISO

How do I logon as root in debian11?

1、你要切換到 root 賬號
su -l
輸入當前賬號密碼

2、編輯 /etc/sudoers 文件
vi /etc/sudoers

sudoers 文件可能會只讀,運行 chmod 解除只讀
chmod -R 777 /etc/sudoers

2.1、找到以下段落
## Allow root to run any commands anywhere
root    ALL=(ALL)     ALL

2.2、添加字段
ian(當前賬號)ALL=(ALL)     ALL

2.3 修改的結果(請注意大小寫)## Allow root to run any commands anywhere
root    ALL=(ALL)     ALL
ian ALL=(ALL) ALL

強制保存退出後,普通賬號就可以調用 sudo 命令

正文完
 0
ianext
版权声明:本站原创文章,由 ianext 于2022-03-11发表,共计351字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。

選擇比努力更重要。

评论(尚無留言)
验证码