How to change user password in linux

little bottle
Release: 2019-05-30 13:25:27
Original
34241 people have browsed it

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:
Copy after login

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.)
Copy after login

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.)
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!