Question: Use Ubuntu 1 ) Use the command line to create five users, along with their home directories: 1 2 3 4 5 2 ) Set

Use Ubuntu
1) Use the command line to create five users, along with their home directories:
1
2
3
4
5
2) Set each user with the password: password
3) Create the following five groups:
math
sports
HR
IT
marketing
4) Place each user you created above into a different group.
5) Give 1 root / superuser privileges.
Section One / Part B
Explain each of the steps you have followed to complete the Tasks 15 given above.
The explanation will include:
6) The commands used, including flags.
7) Screenshots demonstrating the command input and the result.
8) Output of files such as /etc/passwd and demonstrate that the home directories and groups have been successfully added.
9) Show that 1 has superuser privileges.
10) Include an output of your command history file that shows the use of each of the commands that you have explained.
11) Create directories for each department (math, sports, HR, IT, marketing) at the root of the filesystem.
12) Configure standard Linux permissions and ownership such that each group only has access to its own departmental directories.
13) Use Octal permissions to permit one user (and only one user) account to have read permission to the /IT directory.
14) Add another one of your existing user accounts to the sports group.
15) Use each of these two users accounts to create one file each in the /sports directory.
16) Create a file named LinksTest.txt in the /opt directory, and then create a symbolic link to it in the /math directory called link.
17) Use Vim to add the following line of text to the file LinksTest.txt through the /opt/LinksTest.txt path This is the line that I have added.
18) Create 5 files in the /tmp directory: 1.txt,2.txt,3.txt,4.txt,5.txt.
19) Use tar and gzip to bundle and compress the files.
20) Extract these files to 1s home directory from your tarball.anage Files and Backups.
Explain each of the steps you have followed to complete the Tasks 615 given above.
The explanation will include:
21) The commands used, including flags.
22) Screenshots demonstrating the command input and the result.
23) One screenshot demonstration that the permissions have been set, (For example, the sports group has access to the /sports directory but not to other departments' directories.)
24) Output of files (such as /etc/passwd) to demonstrate that the home directories and groups have been successfully added.
25) An output of your command history file that shows the use of each of the commands that you have explained.
Use Vim to create / edit these scripts. (Please, do not use a GUI editor or nano.)
26) Create a bash script file called sys.sh using the following information: (Cut and paste the
following into your Vim editor)
#!/bin/bash
echo "System Information:"
echo "-------------------"
echo "Hostname: $(hostname)"
echo "Operating System: $(lsb_release -d | cut -f 2)"
echo "Kernel Version: $(uname -r)"
echo "CPU Information: $(lscpu | grep "Model name:" | cut -d':'-f 2| sed -e 's/^[[:space:]]*//')"
echo "Memory: $(free -h | awk '/^Mem:/{print $2}')"
echo "Disk Space: $(df -h | awk '$NF=="/"{printf "%s/%s (%s)
", $3,$2,$5}')"
Insert a Screenshot of the Vim editor before saving the file here:
27) Run the sys.sh script (If the script does not run, there will be a simple and logical reason
behind this. Please dont email me to ask why.)
Insert a screenshot that shows the output of the script here:
28) Very briefly (12 Sentences, 15 word sentences max) Explain what task the script is
performing, (This can be described in 1 sentence) Here:
29) Create a bash script file called user.sh using the following information:
(Cut and paste the following into your Vim editor)
#!/bin/bash
read -p "Enter username: " username
if id "$username" >/dev/null 2>&1; then
echo "User '$username' already exists."
else
# Create the user
sudo useradd -m "$username"
echo "User '$username' created successfully."
fi
Insert a Screenshot of the Vim editor before saving the file here:
30) Run the user.sh script twice
use 1 that you created above as the first script run
and testuser1 as the second script run.
Insert a screenshot that shows the output of both script runs here: (2 screenshots please)
31) Explain each step of the user.sh bash script here:
(1 sentence, of no more than 15 words, for each step)
32) Using Vim, create a simple bash script that displays as an output:
The current user name.
The current users shell.
The groups that the current user is a member of
The current date & time
Use remarks within the script to document each step.
The output must display a description of the result (such as: The current Date & Time is: )
33) Insert Screenshot of your script within the Vim editor before s

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!