RHCSA Rapid Track
Performance Checklist
In this lab you will set a default local password policy, create a supplementary group for three users, allow that group to use sudo to run commands as root, and modify the password policy for one user.
Outcomes
You should be able to:
Set a default password aging policy of the local user's password.
Create a group and use the group as a supplementary group for new users.
Create three new users with the new group as their supplementary group.
Configure the group members of the supplementary group to run any command as any user using sudo.
Set a user-specific password aging policy.
Log in to workstation as student using student as the password.
On workstation, run lab users-review start to start the exercise.
This script creates the necessary files to ensure that the environment is set up correctly.
[student@workstation ~]$lab users-review start
From
workstation, open an SSH session toserverbasstudent.On
serverb, ensure that newly created users have passwords that must be changed every 30 days.Set
PASS_MAX_DAYSto30in/etc/login.defs. Use administrative rights while opening the file with the text editor. You can use the sudo vim /etc/login.defs command to perform this step. Usestudentas the password when sudo prompts you to enter thestudentuser's password....output omitted... # Password aging controls: # # PASS_MAX_DAYS Maximum number of days a password may be # used. # PASS_MIN_DAYS Minimum number of days allowed between # password changes. # PASS_MIN_LEN Minimum acceptable password length. # PASS_WARN_AGE Number of days warning given before a # password expires. #
PASS_MAX_DAYS 30PASS_MIN_DAYS 0 PASS_MIN_LEN 5 PASS_WARN_AGE 7 ...output omitted...
Create the new group called
consultantswith a GID of35000.Configure administrative rights for all members of
consultantsto be able to execute any command as any user.Create the
consultant1,consultant2, andconsultant3users withconsultantsas their supplementary group.Set the
consultant1,consultant2, andconsultant3accounts to expire in 90 days from the current day.Determine the date 90 days in the future. You may get a different value as compared to the following output based on the current date and time of your system.
[student@serverb ~]$date -d "+90 days" +%F2019-04-28Set the account expiry date of the
consultant1,consultant2, andconsultant3accounts to the same value as determined in the preceding step.[student@serverb ~]$sudo chage -E2019-04-28consultant1[student@serverb ~]$sudo chage -E2019-04-28consultant2[student@serverb ~]$sudo chage -E2019-04-28consultant3
Change the password policy for the
consultant2account to require a new password every 15 days.Additionally, force the
consultant1,consultant2, andconsultant3users to change their passwords on the first login.Set the last day of the password change to
0so that the users are forced to change the password whenever they log in to the system for the first time.[student@serverb ~]$sudo chage -d 0 consultant1[student@serverb ~]$sudo chage -d 0 consultant2[student@serverb ~]$sudo chage -d 0 consultant3Log off from
serverb.[student@serverb ~]$exitlogout Connection to serverb closed.