![使用 sudo 时出现错误:抱歉,请再试一次](https://linux22.com/image/1017883/%E4%BD%BF%E7%94%A8%20sudo%20%E6%97%B6%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AF%EF%BC%9A%E6%8A%B1%E6%AD%89%EF%BC%8C%E8%AF%B7%E5%86%8D%E8%AF%95%E4%B8%80%E6%AC%A1.png)
这是我尝试时发生的情况:
sudo gedit
[sudo] password for casper:
Sorry, try again.
我的用户名是 casper。
我似乎属于 sudo 组:
id | grep sudo
uid=1000(casper) gid=1000(casper)
groups=1000(casper),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),12 6(sambashare)
认证日志如下:
tail /var/log/auth.log
May 16 18:39:18 casper-pc pkexec: pam_unix(polkit-1:session): session opened
for user root by (uid=1000)
May 16 18:39:18 casper-pc pkexec[2426]: casper: Executing command [USER=root]
[TTY=unknown] [CWD=/home/casper] [COMMAND=/usr/lib/update-notifier/package-
system-locked]
May 16 18:42:16 casper-pc pkexec: pam_unix(polkit-1:session): session opened
for user root by (uid=1000)
May 16 18:42:16 casper-pc pkexec[5463]: casper: Executing command [USER=root]
[TTY=unknown] [CWD=/home/casper] [COMMAND=/usr/lib/update-notifier/package-
system-locked]
May 16 18:45:16 casper-pc pkexec: pam_unix(polkit-1:session): session opened
for user root by (uid=1000)
May 16 18:45:16 casper-pc pkexec[7356]: casper: Executing command [USER=root]
[TTY=unknown] [CWD=/home/casper] [COMMAND=/usr/lib/update-notifier/package-
system-locked]
May 16 18:46:55 casper-pc sudo: pam_unix(sudo:auth): authentication failure;
logname= uid=1000 euid=0 tty=/dev/pts/0 ruser=casper rhost= user=casper
May 16 18:47:00 casper-pc sudo: pam_unix(sudo:auth): conversation failed
May 16 18:47:00 casper-pc sudo: pam_unix(sudo:auth): auth could not identify
password for [casper]
May 16 18:47:00 casper-pc sudo: casper : 1 incorrect password attempt ;
TTY=pts/0 ; PWD=/home/casper ; USER=root ; COMMAND=/usr/bin/gedit
有人能帮我恢复吗sudo
?提前谢谢。
答案1
问题出在你的sudo
软件包上。
你肯定要删除该sudo
软件包,然后使用 重新安装它synaptic package manager
。
希望这对你有帮助。
注意::使用 OP 的评论进行更正。