chage : Linux Command

chage is a Linux command. chage is used to change user password expiry information.

1. To set every user must reset his password on his first login use command as

sudo chage -d0

2. To see when a user reset his password and when his password expires etc we can use below command

sudo chage -l

3.To set or modify last password reset date of a user this command

sudo chage -d 2010-09-10 testing

Screenshot - 10092015 - 12:29:21 AM

4.To set password expiry for a user , use this command

sudo chage -E 2015-10-10 testing

Screenshot - 10092015 - 12:32:05 AM

For more information , Please visit manpage :chage

How to set password with vim

Setting password with vim editor is pretty simple .Open your terminal and type as

vim +X filename.txt

After it got opened it will ask for password, Enter same password two times and thats it. your file got protected by password. next you want to open it then you must now the password

…..