Sudo:會話仍然開啟而不卸載

Sudo:會話仍然開啟而不卸載

Ubuntu Trusty Tahr 14.04 正在我的電腦上運行。

我的電腦上的 sudoers 檔案被錯誤地編輯,現在看起來像這樣:

Defaults        env_reset
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

root        ALL=(ALL:ALL) ALL

我以簡單使用者登入。當我跑步時sudo,我得到了Sessions still open, not unmounting。我可以做什麼來恢復以前的/etc/sudoers文件?

多謝!

答案1

改編其中之一我之前的回答,從包中獲取文件sudo

apt-get download sudo
dpkg-deb --fsys-tarfile sudo_*.deb | pkexec tar -xC / ./etc/ssh/ssh_config

當你需要root權限但不起作用時使用pkexec而不是。sudosudo

相關內容