【linux】忘记普通用户的密码或是嫌原有密码太长难记怎么办?
当忘记普通用户的密码或是嫌原有密码太长难记时,可切换到root用户,然后用passwd **命令修改之,具体如下:
[hy@localhost ~]$ su - root Password: Last login: Sun May 15 01:05:53 EDT 2022 on pts/0 [root@localhost ~]# passwd hy Changing password for user hy. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. [root@localhost ~]#
之后再登录就OK了。
END