If you’re thinking of migrating from a shared hosting account to a VPS, one thing you’ll need to get used to is shell access. When you buy a VPS server, usually you are given access to SSH to directly manage the VPS through the command-line interface. However, this also involves a security risk for you or any other user account. Because weak passwords are often the cause of security incidents, it is important to use strong passwords. You can also set certain parameters so that passwords are changed periodically.
A program called “chage” can set the time frame for changing passwords. The formula for setting the time interval is:
# chage -m [numeric value] -M [numeric value] -W [numeric value] username
m – The minimum number of days allowed between password changes
M – The maximum number of days for which a password is valid
W – Warn – specifies how many days before changing a password the user is notified of this
For example, if you specify the user mario must wait 30 days before their password manually change; it must change its password every 60 days and must be notified 7 days before the password expires, then the command will look like this:
# chage -m 30 -M 60 -W 7 mario
This is a tool that you can use to remind you to change your password at certain time intervals, and that you can use it to remind other users to change their password periodically. For more information, type in the command line “man chage” or consult the online documentation .