Recently I got a question that read as follows:
How do I force user foo to change a password at the first time login using ssh?
As a sys admin you may need this kind of facility. There are many ways to achieve this.
You can set empty/null password and use passwd command to expire password. This will result into immediate password change for the first time.
For example you just need to type following two commands:
# usermod -p “” foo
# chage -d 0 foo
You can also ignore first command if foo is already exists in system.Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?