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
Use the command line to create five users, along with their home directories:
Set each user with the password: password
Create the following five groups:
math
sports
HR
IT
marketing
Place each user you created above into a different group.
Give root superuser privileges.
Section One Part B
Explain each of the steps you have followed to complete the Tasks given above.
The explanation will include:
The commands used, including flags.
Screenshots demonstrating the command input and the result.
Output of files such as etcpasswd and demonstrate that the home directories and groups have been successfully added.
Show that has superuser privileges.
Include an output of your command history file that shows the use of each of the commands that you have explained.
Create directories for each department math sports, HR IT marketing at the root of the filesystem.
Configure standard Linux permissions and ownership such that each group only has access to its own departmental directories.
Use Octal permissions to permit one user and only one user account to have read permission to the IT directory.
Add another one of your existing user accounts to the sports group.
Use each of these two users accounts to create one file each in the sports directory.
Create a file named LinksTest.txt in the opt directory, and then create a symbolic link to it in the math directory called link.
Use Vim to add the following line of text to the file LinksTest.txt through the optLinksTesttxt path This is the line that I have added
Create files in the tmp directory: txttxttxttxttxt
Use tar and gzip to bundle and compress the files.
Extract these files to s home directory from your tarball.anage Files and Backups.
Explain each of the steps you have followed to complete the Tasks given above.
The explanation will include:
The commands used, including flags.
Screenshots demonstrating the command input and the result.
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.
Output of files such as etcpasswd to demonstrate that the home directories and groups have been successfully added.
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.
Create a bash script file called syssh using the following information: Cut and paste the
following into your Vim editor
#binbash
echo "System Information:"
echo
echo "Hostname: $hostname
echo "Operating System: $lsbrelease d cut f
echo "Kernel Version: $uname r
echo "CPU Information: $lscpu grep "Model name:" cut d:f sed e s:space:
echo "Memory: $free h awk Mem:print $
echo "Disk Space: $df h awk $NFprintf ss s
$$$
Insert a Screenshot of the Vim editor before saving the file here:
Run the syssh 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:
Very briefly Sentences, word sentences max Explain what task the script is
performing, This can be described in sentence Here:
Create a bash script file called usersh using the following information:
Cut and paste the following into your Vim editor
#binbash
read p "Enter username: username
if id $username" devnull &; 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:
Run the user.sh script twice
use that you created above as the first script run
and testuser as the second script run.
Insert a screenshot that shows the output of both script runs here: screenshots please
Explain each step of the user.sh bash script here:
sentence, of no more than words, for each step
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:
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
