Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I would like the answer for (b) terminal used is kali lunix CSC 3020 Introduction to Cybersecurity Lab Assignment 2 CAE-CD Knowledge Units Covered in
I would like the answer for (b) terminal used is kali lunix
CSC 3020 Introduction to Cybersecurity Lab Assignment 2 CAE-CD Knowledge Units Covered in the Assignment (100 pts) For this assignment, you will be using Kali Linux. (a) Perform the following account management operations i. Add a new user David as follows sudo useradd m - d /home/david david ii. Set cybersecurity as password for David using the following sudo passwd david iii. Login as David using the following su david iv. Change current direcrtory to /home/david with the following cd v. Change the permissions of / home/david directory to rwx for user only using the following chmod 700 david vi. Copy passwd file to /home/david using the following cp /etc/passwd . vii. Check the file in current directory using ls al viii. Return to user kali using the following exit ix. Add a new user Jason as follows sudo useradd -m -d/home/jason jason x. Set networksecurity as password for jason using the following sudo passwd jason xi. Login as jason using the following su jason xii. Try to switch the directory to /home/david to access David's passwd file using the following cd /home/david xiii. You will get an error message and won't be able to access it since accounts are isolated and David changed permissions to self access only. (b) Write a shell script to count the number of directories under "/home". After above steps you should have 3 directories kali, david and jason. Pay attention to the following. i. Use backquotes to assign the output of a command to a variable. Note that ' is different from ' and you need to use '. ii. You can use ls command to find a list of users. iii. You need a loop to go through each user. iv. Use a counter variable to count the number of users. What to submit. Submit a pdf copy of your script and the outputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started