linux-w1ie:~ # usermod -L sadhiq Figure 1: Locking the users account.
Once the account has been locked you can issue the "chage" command with the "-d" qualifier to set the expiry date to zero as shown in Figure 1.1. linux-w1ie:~ # chage -d 0 sadhiq Figure 1.1: Set password to expiry immediately. Once you have set the password to expiry immediately you can unlock the users account using the "usermod" command with the "-U" qualifier as shown in Figure 1.2. linux-w1ie:~ # usermod -U sadhiq Figure 1.2: Unlocking the users account. The next time the user tries to login they will be presented with a message forcing them to change their password as shown in Figure 1.3. linux-w1ie login: sadhiq Password: Password change requested. Choose a new password. Old Password: Figure 1.3: Logging into the system via terminal. If the user also logs in via the GDM interface they will also be prompted to change their password. The above method we just explained is a bit long winded, this process can be done with one command, simply issue the "passwd" command with the "-e" qualifier as shown in Figure 1.4. linux-w1ie:~ # passwd -e sadhiq Password expiry information changed.

