ITEC 274: Lab #2 – Linux- 40mks Banjade = My last nameplease use this Instructions Answer the questions below thoroughly and completely (half complete commands will not be sufficient) .You will...

1 answer below »

ITEC 274: Lab #2 – Linux- 40mks



Banjade = My last nameplease use this



Instructions



Answer the questions below thoroughly and completely(half complete commands will not be sufficient).You will submit your answers for this part of the homework via thisword document. No other documents or formats will be accepted.Submit via BlackBoard /LAB.Plagiarize work with be given a zero grade.







*Perform the following using the Ubuntu VM you created- --No other version of Linux should be used –you will lose points otherwise.



**All work is to be done from the Linux terminal console window NOT the GUI. You will lose points otherwise.



Note:Your screenshot must be clear enough to understand what is on the image.You will lose points if screenshots are not clear and does not go with the right questions.





* Do not
use the root account [#]




1.
Viewinguser account informationfrom the Linux command line
[ 2pts]


a.List all the standard users (regular users only – exclude service users) on the system and also give their ‘User ID number’by exploring the following/etc/passwdfiles.





2.
Working with Users and Groups
[8pts ]


a.Create two (2) new user accounts and use your
last-name> for the second account. Set the passwords to different values, but don't use passwords that you actually use in other systems.



i. What command did you use to create the user accounts? Show and identify that the accounts were created >>>>>[ give full command- type this out]


b.Find and show the home directory of all the users in question(2a).[Paste screenshot showing results here …]



c. Make the new user account created with
your

a 'sudo user' with admin privileges - use
syntax
: usermod -aG sudo


i.
Note:
[replace the with the name of the user create above





ii. Verify that the user is now a part of the
sudo
group < paste="" screenshot="" here="">>



d.What is the command to view all the currently logged in users?


i.< provide="" screenshot="" here="">>





3.

Login into account with > and perform the following:

[ 9pts ]


a.Create one (1) new group,[use an identifiable group name],show that the group was created



i. What is the name of the group you created?



ii. Provide screenshot that shows that the group was created?


b.Assign bothusers account created in question [2a]to the group created above


i.What command was used?



ii.Show that the user accounts are added to thegroup




c.Lock the first user account only in question [2a]. What command was used?


i.Provide screenshot to show that this user account is lock



d.Suppose that the account in question[3c] above has expired and you want to reactivate is until“July 9, 2020”. Give the full command that can reactivate this account.



i.Provide screenshot showing activated account here…



ii.Fix the lock account issue in question[3c]– by unlocking the account


·What command was used?>> show that the account is unlock




4.
Working with Permissions and Access Control[10pts]


a. In the
second
user
account created with your
last-name.

i.Create two new directories label [Homework and Class] and two [2] files label [HW1.txt and room.txt]insideDocumentsdirectory.


ii.Add one line of text to at least one (1) of the files created abovedisplay the text to the screen after >


b.Moveboth filesto directoryHomeworkandCopy anyone[1]of the file toClassdirectory.


i.Give the full command used and show that the files have been bothmoved and copiedto the intended directories.


ii.Show the permissions for both files inside the “Homework” folder. [Hint: use long option ]




c.Remove all permission from the file that has text in [4a –ii] above.


i.Show that the files permission has being removed



ii.After the permissions have been removed are you able to open, modify or read the file?If yes or no state reason. What error message is shown if any? [ Hint: you can use the GUI here to verify this – only for this question is GUI allowed ]
















5.
Working withLinux shell script[ 11pts]





Write a Linux shell script that does the following:



a.Ask user to enter their name and then display it to the screen.


b.Ask user to enter two (2) numbers,Dividethe numbers entered and output the result to the screen.


c.Next do a checkfor all three (3) situations belowand display the correct messages.



Note:“If the result in [b] is less than or equal to [35]then the user is on theYellowteam, if greater than [35]they are on theBlueteam.If the result is less than or equal to zero[0] then display a message to the user that they are not on a team, will have to wait.



i.Give a screenshot showing all three results displayed on screen after running the script.



ii.Submit the full shell code script asa text file or paste the full code in this document.>>No image screenshot of code…


·Your code must compile and execute on Ubuntu Linux --- you will lose points if it does not compile.Use the read command to take the input from the keyboard and echo command to display results to screen.


Answered Same DayJul 04, 2021

Answer To: ITEC 274: Lab #2 – Linux- 40mks Banjade = My last nameplease use this Instructions Answer the...

Pranav answered on Jul 06 2021
141 Votes
ITEC 274: Lab #2 – Linux
1. Viewing user account information from the Linux command line
a. List all the standard users (regular users only – ex
clude service users) on the system and also give their ‘User ID number’ by exploring the following /etc/passwd files.
Output:
Command: $awk -F":" ' BEGIN {printf "%-8s %-3s\n" , "USER", "UID"} NR==1,NR==10 {printf "%-8s %3d\n", $1,$3}' /etc/passwd
2. Working with Users and Groups [8pts ]
a. Create two (2) new user accounts and use your < last-name> for the second account. Set the passwords to different values, but don't use passwords that you actually use in other systems.
Output:
b. Find and show the home directory of all the users in question
Output:
c.Make the new user account created with your a 'sudo user' with admin privileges - use syntax : usermod -aG sudo
Output: i.
Verify that the user is now a part of the sudo group
Output: ii.
d.What is the command to view all the currently logged in users
Output:

3. Login into account with <> and perform the following: [ 9pts ]
a. Create one (1) new group, [use an identifiable group name], show that the group was created
i. What is the name of the group you created?
Output:
ii. Provide screenshot that shows that the group was created?
Output:
b. Assign both users account created in question [2a] to the group created above
i. What command was used?
Output:
ii. Show...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here