Linux服务器密码已过期。更改密码时,不会重播

Linux服务器密码已过期。更改密码时,不会重播,linux,change-password,Linux,Change Password,我的centos服务器密码已过期,请注意更改密码: Last login: Tue Sep 11 11:33:19 2018 from 172.17.x.x WARNING: Your password has expired. You must change your password now and login again! Changing password for user test. Changing password for test. (current) UNIX password

我的centos服务器密码已过期,请注意更改密码:

Last login: Tue Sep 11 11:33:19 2018 from 172.17.x.x
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user test.
Changing password for test.
(current) UNIX password:
New password:
Retype new password:
但是,当我输入两次新密码时,服务器正在等待。。。 没有为我更改成功消息重播,为什么? 谁能帮我

哭吧哭吧…

如果你正在使用ubuntu,试试这个方法

只需转到GRUB,然后在第二个选项中选择Advanced 在第二个选项中选择恢复模式

在那里,您将得到一个名为DropyourRootShell的选项 选择那个,然后

Press Enter for maintenance
(or press Control-D to continue):
# mount -o remount,rw /
# passwd <username>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
# reboot
如果您使用的是RPM类型的操作系统

启动过程一开始,按ESC键即可显示GRUB启动提示。您可能需要从控制面板关闭系统,然后再重新打开以到达GRUB引导提示符。 您将看到一个GRUB引导提示-按e编辑第一个引导选项。如果您没有看到GRUB提示符,则可能需要在机器启动前按任意键将其显示出来 找到以linux16开头的内核行,将ro更改为rw init=/sysroot/bin/sh。 按CTRL-X或F10启动单用户模式。 使用以下命令访问系统:chroot/sysroot。 运行passwd更改根密码。 重新启动系统:Reboot-f


更多详细信息

您是否尝试过或。Stack Overflow是一个提供编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参见帮助中心中的。也许或者会是一个更好的提问的地方。