Change Passwords and Adjust Password Aging for Local User Accounts

Red Hat Enterprise LinuxBeginner
Practice Now

Introduction

As a system administrator, you are responsible for managing user accounts and ensuring the security of your system. A critical part of this role involves enforcing strong password policies, which includes periodically changing passwords and setting password aging rules. In this challenge, you will practice changing passwords and adjusting password aging settings for local user accounts on a Red Hat Enterprise Linux system.

Change Passwords for Local User Accounts

Your first task is to change the passwords for the demouser and demoadmin user accounts that were created during setup. This is a fundamental security practice to ensure that default or compromised passwords are not in use.

Tasks

  • Change the password for the demouser user account.
  • Change the password for the demoadmin user account.

Requirements

  • The new password for the demouser user account must be userpass123.
  • The new password for the demoadmin user account must be adminpass123.
  • All password changes must be performed using the appropriate command-line tool from your terminal.

Hints

  • The standard command for changing user passwords is passwd.
  • To change another user's password, you may need elevated privileges using sudo.
  • The command will prompt you to enter and re-enter the new password interactively.

Adjust Password Aging for Local User Accounts

To enhance security, you will now configure password aging policies. This forces users to change their passwords after a specified period. You will set different expiration periods for the regular user and admin user accounts.

Tasks

  • Set the maximum password age for the demouser user account to 90 days.
  • Set the maximum password age for the demoadmin user account to 180 days.

Requirements

  • The password for the demouser user account must be configured to expire after 90 days.
  • The password for the demoadmin user account must be configured to expire after 180 days.
  • All password aging changes must be performed using the appropriate command-line tool.

Hints

  • The chage command is used to modify user password aging information.
  • The -M option sets the maximum number of days a password remains valid.
  • You will need sudo to change the aging settings for any user.
  • You can verify your changes by using the chage -l <username> command.

Summary

In this challenge, you have learned how to perform essential user account security tasks on a Linux system. You practiced using the passwd command to change user passwords and the chage command to enforce password aging policies. Mastering these skills is fundamental for maintaining the security and integrity of any Linux environment.

✨ Check Solution and Practice✨ Check Solution and Practice