There is a way to force a user to change their password at first logon the system. This can be done with –d option.
Chage is used to configure an password expiry from the shell prompt followed by many options available.
Force User To Change
The syntax is chage –d 0 username
We have created a user with test and password is abc
Now we’re going to force a user to change the password at first login.
Chage –d 0 test
After this command user will have to change the password at first login. You can also use -e option as well.
After putting old password it will jump to ask you to change the current password as shown in figure.
Finally password has been changed.