Question

Linux ################################################# Login as itadmin Create a file by executing the following command: date >> LAB-linuxsrv.log...

Linux #################################################

Login as itadmin

Create a file by executing the following command:

date >> LAB-linuxsrv.log

Use adduser to add 5 users to your Linux VM. Give them the following usernames:

lauren

michael

nancy

opal

peter

Set all 5 initial user passwords to cisc0SanFrancisc0 – (those are zeros, not letters)

Do a desktop login for each of the 5 users just created

su to root and do an ls -la /home/* and append the output to the lab logfile.

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

(adjust the path to the logfile as needed throughout the lab)

Append the contents of your /etc/passwd file to the lab logfile

Append the contents of your /etc/shadow file to the lab logfile

Delete the user lauren

Append the contents of your /etc/passwd file to the lab logfile

Append the contents of your /etc/shadow file to the lab logfile

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

Put all the users in the peter group (in addition to their own groups)

Append the contents of your /etc/passwd file to the lab logfile

Append the contents of your /etc/shadow file to the lab logfile

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

exit from root back to itadmin

using the export PATH command, set the path in your current shell to include /home/itadmin/midterm

create the /home/itadmin/midterm directory and change into it

create a file called midterm-commands.sh and put the following commands into it:

ls -la

ps

Save and close the file

Make the script executable with chmod

Execute the script and direct the output to your logfile

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

Close your current shell and open a new shell

Set the PATH in your .profile file to include the midterm directory

do the env command and output to the logfile

cd to /root and execute the script again from there, output to the logfile

change the prompt for itadmin to end with the text “ADMINISTRATOR”

source the file to make the prompt change now

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

output the entire contents of the file you had to modify to make the prompt change to the logfile

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

shut down eth0 and use ifconfig to output to the logfile to show eth0 down

bring back up eth0 and use ifconfig to output to the logfile to show eth0 back up

go to the midterm dir and do “ps -elf” directing output to a new file called ps-output1

do it again and this time use the filename ps-output2

using chmod with octal arguments (###) change the permissions to read-write-execute for user, read-execute for group and other on all files in the directory with a single command

do ls -la and redirect to the (original) logfile - LAB-linuxsrv.log

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

use chmod with character arguments to put the permissions to the equivalent of 644 on all files in the dir.

do ls -la and redirect output to the (original) logfile

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

open a browser, go to YouTube, find a long video and begin playing it, minimize the browser

use the ps command piped to grep to find the process for the browser

use the kill command to kill the browser process that you just found

use chown to reassign all files in midterm to root ownership

use rm to remove the midterm dir and all files (be careful if you moved your logfile to there, take it out first!)

do a man on tcpdump and pipe that to grep to find some EXAMPLES of using tcpdump, redirecting the output to the logfile (Hint: do a man on grep first to find out how to print “context” around the found text)

Put a timestamp in your logfile with: date >> LAB-linuxsrv.log

When you are done with all the exercises, upload the two log files and your Linux .bash_history files for both itadmin and root

The 4 files you submit are:

MT-winsrv.log

MT-linuxsrv.log

/root/.bash_history

/home/itadmin/.bash_history

0 0
Add a comment Improve this question Transcribed image text
Answer #1

i have completed till this exercise "create the /home/itadmin/midterm directory and change into it" i because we are allowed to do only 4 exercise but if you need more then post on another new question.

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)

Add a comment
Know the answer?
Add Answer to:
Linux ################################################# Login as itadmin Create a file by executing the following command: date >> LAB-linuxsrv.log...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT