Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2 Groups and Usermod: In this lab, you will practice using the usermod command to manage user accounts and groups in a Linux environment.
Part Groups and Usermod:
In this lab, you will practice using the usermod command to manage user accounts
and groups in a Linux environment. You will learn how to modify user attributes such
as the username, primary group, supplementary groups, home directory, login shell,
and expiration date.
Instructions:
Create Test Users and Groups:
Create two test users named user and user using the useradd command.
Create two test groups named group and group using the groupadd command.
Modify User Attributes:
Use the usermod command to modify the attributes of user and user as
follows:
Change the username of user to newuser
Set the primary group of user to group
Add user to the supplementary groups group and group
Change the home directory of user to homecustomhome
Change the login shell of user to binksh or csh or sh which ever is available
Set an expiration date for users account to one week from the current date.
Verify Changes:
Use appropriate commands id grep, cat etcpasswd etc. to verify that the
modifications made to user accounts and groups have been applied correctly.
Cleanup:
Remove the test users and groups created during the lab using the userdel and
groupdel commands.
Tips:
Use the man command to read the manual pages for usermod and useradd to
understand their usage and options.
Make sure to execute usermod commands with administrative privileges using sudo
or as the root user.
Doublecheck your modifications to user accounts and groups before proceeding
with verification to ensure accuracy.
Pay attention to the syntax of commands and options to avoid errors.
Please provide screenshots for each command in the submitted documen
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started