Ideally, passwords should be changed regularly. This article describes how to setup password expiration using the User Manager application in Red Hat Enterprise Linux 5 or CentOS 5.

User Manager1. Click Applications then select System Settings and click Users and Groups. This will launch the User Manager window.
User Manager2. Select the user you wish to configure and click Properties.
User Manager3. In the User Properties windows, click the Password Info tab.
User Manager
4. Check the Enable Password Expiration checkbox to enable password expiration. The list below describes the available settings.
  • Days before change allowed
    Number of days from the last password change to allow another password change.
  • Days before change required
    Number of days from the last password change to require another password change.
  • Days warning before change
    Number of days before the expiry of the password to notify the user.
  • Days before account inactive
    Number of inactive days after the expiry of the password to deactivate the account. 0 means do not deactivate.
NoteYou can also do this from the command line, below are the equivalent commands.
  • chage login_name
    modifies the password expiry information of the specified login name. You need root access to use this command.
  • chage -l login_name
    shows the password expiry information of the specified login name
  • chage
    displays the help information
NoteYou can notify the users with expiring password via email using the checkpwexpire script. Copy the script into the /etc/cron.daily and give it execute permission so it will automatically run every day.
 

Visit the forum to ask for help or to give a comment.

***
Posted on 8/5/2009 and last updated on 11/6/2009
Filed under CentOS 5 , Red Hat Enterprise Linux 5 , System Administration