Home>Article>Operation and Maintenance> How to change user password in linux

How to change user password in linux

little bottle
little bottle Original
2019-05-30 13:25:27 34188browse

Linux is a free and open source Unix-like operating system. Linux can be installed on a variety of computer hardware devices, from cell phones, tablets, routers, and video game consoles, to desktop computers, mainframes, and supercomputers. So how do we change the password when we log in to the Linux system every day?

How to change user password in linux

passwd command to modify user password

Enter passwd (enter the old password and new password as prompted. Note: If the password is too short You will be prompted and re-entered)

[yuan@yuan ~]$ passwd Changing password for user yuan. Changing password for yuan (current) UNIX password: NEW UNIX password:

Another function of passwd is: view the user password status

passwd -S user name //S must be uppercase

[root@yuan ~]# passwd -S root root PS 2018-08-08 0 99999 7 -1 (Password set, SHA512 crypt.)

It can be seen that the Linux password is encrypted by the SHA512 algorithm.

You can also use the --status command to view the password status

[root@yuan ~]# passwd --status root root PS 2018-08-08 0 99999 7 -1 (Password set, SHA512 crypt.)

The above is the detailed content of How to change user password in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn