代码之家  ›  专栏  ›  技术社区  ›  hellojoshhhy

删除用户密码后无法登录

  •  1
  • hellojoshhhy  · 技术社区  · 7 年前

    我在ubuntu16.04中使用了以下命令来删除用户密码

    sudo passwd -d <user_name>
    

    但之后,它仍然提示我输入密码,我不能登录任何密码或没有密码。

    由于用户是唯一的用户,机器现在完全无法访问

    0 回复  |  直到 7 年前
        1
  •  1
  •   Alex_Krug    7 年前

    如果您没有其他管理帐户,并且忘记(或删除)了Linux帐户的密码,因此无法登录到操作系统,则需要单用户模式来重置密码。

    passwd

    https://www.vultr.com/docs/boot-into-single-user-mode-reset-root-password

    https://linuxconfig.org/how-to-reset-lost-root-password-on-ubuntu-16-04-xenial-xerus-linux

    推荐文章