0% found this document useful (0 votes)
62 views2 pages

Practica Final 2 de Curso Linux

The document provides instructions for creating a bash script that automates user and group management tasks like creating a unique group and user, setting passwords and permissions, without hardcoding specific values; the script should check for duplicate names, report errors, create home directories with proper ownership and permissions, and be executable. Objectives, hints, curriculum resources and deliverables are outlined to guide the creation of the script.

Uploaded by

Testc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Practica Final 2 de Curso Linux

The document provides instructions for creating a bash script that automates user and group management tasks like creating a unique group and user, setting passwords and permissions, without hardcoding specific values; the script should check for duplicate names, report errors, create home directories with proper ownership and permissions, and be executable. Objectives, hints, curriculum resources and deliverables are outlined to guide the creation of the script.

Uploaded by

Testc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Laboratorio 2 de curso Linux

Instructions
Case Scenario
In the User Management challenge lab, you were tasked with creating users
and groups. Using the commands one at a time from the command line can
be a tedious process and could lead to potential errors in syntax. It is your
duty, as an administrator, to make the process as seamless and efficient as
possible.

Objectives
Create a bash script to perform user management tasks as outlined below:

 Create a new group. Each group must have a unique name. The
script must check to ensure that no duplicate group names
exist on the system. If a duplicate is found, an error needs to be
reported, and the administrator must try another group name.
 Create a new user. Each user must have a unique name. The
script must check to ensure that no duplicate usernames exist
on the system. If a duplicate is found, an error needs to be
reported and the administrator must try another username. The
user will have a Bash login shell and belong to the group that
was created in the previous step.
 Create a password for each user that is created.
 Ensure that the new user created is a member of the new group
created.
 Create a directory at the root / of the file system with same
name as the user created.
 Set the ownership of the directory to the user and group
created.
 Set the permissions of the directory to full control for the owner
and full control for the group created.
 Set the permissions to ensure that only the owner of a file can
delete it from the directory.
 Ensure that the script is executable.

This script should be designed to accept any username and any group
name.DO NOT hardcode commands to create specific usernames and group
names.

Hints
 Logical order is important.
 There is a special wildcard that can be used to determine if the
previous command is successful or not. This will be useful for
this script.

Curriculum Resources
 Module 9 – Basic Scripting
 Module 14 – Create a New User
 Module 15 – Ownership and Permissions

Deliverables
 Execute the script for the instructor. Create a new unique user
and new unique group.
 Execute the script for the instructor. Show the error when a
duplicate user or duplicate group are created.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy