Answered step by step
Verified Expert Solution
Link Copied!

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 2 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 user1 and user2 using the useradd command.
Create two test groups named group1 and group2 using the groupadd command.
Modify User Attributes:
Use the usermod command to modify the attributes of user1 and user2 as
follows:
Change the username of user1 to newuser1.
Set the primary group of user1 to group1.
Add user2 to the supplementary groups group1 and group2.
Change the home directory of user2 to /home/customhome.
Change the login shell of user2 to /bin/ksh, or csh, or sh, which ever is available
Set an expiration date for user2's account to one week from the current date.
Verify Changes:
Use appropriate commands (id, grep, cat /etc/passwd, 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.
Double-check 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions