
我開始收到一則訊息
dims is not in the sudoers file. This incident will be reported.
關於我自己。
怎麼會發生這種事?
我發出的可疑命令是創建“高級”群組並將自己添加到其中。
addgroup advanced
usermod -G advanced dims
這會破壞我的 sudo 權限嗎?
答案1
後
usermod -G advanced dims
使用者dims
只是該群組的成員advanced
,而不是任何其他群組的成員。因此,由於他不是該組的成員admin
,或者sudo
他不再被允許使用sudo
.
若要將使用者新增至另一個群組,您需要使用 switch -a
to usermod
,例如
usermod -a -G advanced dims