Ubutun 执行sudo执行报错?

sudo -i
Sorry, try again.
Sorry, try again.
Sorry, try again.
sudo: 3 次错误密码尝试

可能是你的/etc/sudoers 文件修改过
未修改过的长这样
#

This file MUST be edited with the 'visudo' command as root.

#

Please consider adding local content in /etc/sudoers.d/ instead of

directly modifying this file.

#

See the man page for details on how to write a sudoers file.

#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

Host alias specification

User alias specification

Cmnd alias specification

User privilege specification

root ALL=(ALL:ALL) ALL

Members of the admin group may gain root privileges

%admin ALL=(ALL) ALL

Allow members of group sudo to execute any command

%sudo ALL=(ALL:ALL) ALL

See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

可能是你的/etc/sudoers 文件修改过
未修改过的长这样
#

This file MUST be edited with the 'visudo' command as root.
#

Please consider adding local content in /etc/sudoers.d/ instead of
directly modifying this file.
#

See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

Host alias specification
User alias specification
Cmnd alias specification
User privilege specification
root ALL=(ALL:ALL) ALL

Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

sudo: 3 次错误密码尝试, 密码输错了吧, 忘记密码了?

改一下root密码试试

应该是root密码错误

你找一台赶紧的机器

对照一下/etc/pam.d/文件夹下的文件内容。

通常是system-auth-ac或者system-auth配置的不合理;

修改ok之后

清空你用户错误输入次数
使用命令pam_tally2

具体用法自己研究一下

小键盘默认是上锁的,查看你输入密码的时候是不是小键盘数码锁定了。