Change personal account password If ordinary users want to change their personal account passwords, they only need to run the passwd command without any other commands:
Sample output: Changing password for nick (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully The system will prompt us to enter the current password first. If the password is correct, we will be asked to re-enter and confirm the new password. The next time you log in to the Linux system, you can use the new password. NOTE: When you enter your password, it will not be displayed on the screen. Change another user's password As a normal user, you can only change your own password. However, the root user and users with sudo privileges can change the passwords of other users. We need to log in as root user and type the following command to change the password for user nick: $ passwd nick Or use sudo command $ sudo passwd nick Output: You will be prompted to enter and confirm a new password Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Force the user to change password at next login By default, passwords are set to never expire. If you want to force the user to change their password at the next login, you need to use the passwd command with the --expireoption followed by the user's username, for example: $ sudo passwd --expire nick This will immediately expire the password for the user account. The next time the user tries to log in with their old password, a message will appear forcing them to change their password: $ ssh [email protected] Output: WARNING: Your password has expired. You must change your password now and login again! Changing password for nick. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Connection to 192.168.121.209 closed. After the user sets a new password, the connection is closed. You may also be interested in:
|
<<: express project file directory description and detailed function description
>>: mysql executes sql file and reports error Error: Unknown storage engine'InnoDB' solution
Step 1: Configure environment variables (my decom...
Table of contents Preface style-loader css-loader...
In the previous article, we talked about MySQL tr...
Today, let’s talk about how to start four MySQL d...
The outermost boxF rotates 120 degrees, the secon...
[Looking at all the migration files on the Intern...
Deepin 2014 download and installation For downloa...
1. Download Navicat for MySQL 15 https://www.navi...
Use nginx to configure the separation of PC site ...
Table of contents 1. Open the project directory o...
Search online to delete duplicate data and keep t...
Table of contents Written in front Login Overview...
Preface There are 4 types of operators in MySQL, ...
1. Download VMware Workstation 64 version https:/...
Table of contents Common key aliases Key without ...