Obtain process information for the unix or linux system

Assignment Help Operating System
Reference no: EM131144845 , Length:

Question:

The output of the commands has to be captured and write some information about command in an word file.Project 2 - Part 1 Process Management

In a new Linux virtual machine within VMPlayer:

1. To obtain process information for the UNIX or Linux system, use the command ps-ael. Use the command man ps to get more information about the ps command. Describe what this command does.

2. Construct a process tree similar to Figure 1. Look up the Linux command pstree -p and describe what it does. Then type in the command the capture the output.

1737_Fig.jpg

3. Create a process in the background ( such as (date;sleep 10; date) >date.out & ), and run ps -ael and identify the added processes running now.

4. Verify the job is running by typing the command jobs. Describe what this command does.

5. Type the following program in a textfile called three_forks.c. Compile it using gcc and then run it in the background.

a) Describe what the fork() call does.

b) Including the initial parent process, how many processes are created by the program shown? Verify your answer by running ps -ael.

c) Kill the processes created in this part one by one and terminate them by the kill command. Show each is killed by running ps -ael.

Tasks

1. Create a user called "victim" with sudo privileges and create a directory called "public" for him with rwx access for all.

2. Create a user called "attacker" with no sudo privileges. Log in as this user and create a malware file called "date" to mascaraed the date Linux command. This malware file should give sudo privileges to attacker.

3. Run a scenario in a Linux bash shell to demonstrate and verify that after the scenario is executed, attacker is given sudo rights by victim. Test actually that attacker has sudo privileges now.

Capture all the key screens using a screen capture tool (such as Windows 8) snipping tool. Put all captures in you MS Word project report file with some explanation of what each major step is.


Answer the following questions:

1. If after giving himself sudo privileges, attacker wanted to change victim's password, what commands should type in Linux?

2. Look up what bashrc file is and in one paragraph describe it.

#include <stdio.h>

#include <unistd.h>
// Note that fork() returns a pid - it returns a 0 to the child process...

int main()

pid_t mypid, pid;
printf("Start: pid = %d\n", getpid());
/* fork a child process */ pid  fork();
if (pid = 0)
printf("Child -
else
printf("Parent - ");
printf("After 1st fork: pid = %d\n", getpid());
/* fork another child process */
pid = fork();
if (pid = 0)
printf("Child - ");
else
printf("Parent - ");
printf("After 2nd fork: pid = %d\n", getpid());
/* and fork another */ pid = fork();
if (pid = 0)
printf("Child - ");
else
printf("Parent - ");
printf("After 3rd fork: pid = %d\n", getpid());
while ( );
return;

The output of the commands has to be captured and write some information about command in an word file

Verified Expert

The solution contains the screenshots as well as answer, for each step undertaken, for two parts of the assignment, undertaken on Linux environment. All the necessary screenshots have been included in report itself.

Reference no: EM131144845

Questions Cloud

Prepare a schedule of cost of goods manufactured : During the month, the company purchased $164,000 of raw material; direct material used during the period amounted to $128,000. Factory payroll costs for July were $197,000 of which 85 percent was related to direct labor. Overhead charges for deprecia..
Prepare a work breakdown structure : prepare a Work Breakdown Structure, a Gant Chart with the critical path and a Project Team Org Chart with contact information.
Summarize three of most important messages of iom reports : From your perspective as a health care professional and/or consumer, summarize two or three of the most important messages of the IOM reports To Err is Human and Crossing the Quality Chasm.
Discuss both the financial and nonfinancial factors : Determine the net credit and collection expense in dollars and as a percentage of sales after considering the revenue not earned from other investment opportunities.
Obtain process information for the unix or linux system : Create a process in the background ( such as (date;sleep 10; date) >date.out & ), and run ps -ael and identify the added processes running now.
Explain why it would be the appropriate technique to apply : Provide at least one example of when you might use (1) the minimal-spanning-tree technique, (2) the shortest path, and (3) the maximal flow through a network technique. and explain why it would be the appropriate technique to apply in each of the ..
What types of modifications to the model would eliminate : Why does the varieties model of technological change from section 6.1 exhibit a scale effect in the sense that the growth rate rises with the aggregate quantity of labor, L? Is it reasonable to identify L empirically with a country's population?
Identify one of the six dimensions of quality : Identify one of the six dimensions of quality (safety, effectiveness, patient-centeredness, timeliness, efficiency, or equity) that you would like to focus on for this Discussion.
What are some of the benefits of factoring : If a company factors its receivables, what percentage of the value of the receivables can it expect to receive from the factor in the form of cash, and how quickly will it receive the cash?

Reviews

Write a Review

Operating System Questions & Answers

  Maximum power transfer theorem

For the circuit below, what is the voltage across R(load) if the Maximum Power Transfer Theorem determines the value of R(load)?

  Television clips in a powerpoint presentation

Computers and television would work is when you tape television demonstrate that can be used to give flavor to PowerPoint Presentations.

  What are some of the key characteristics of an embedded os

What are some of the key characteristics of an embedded OS? Describe some examples of markets where embedded systems are used. Discuss why they are important. Describe some examples of markets where embedded systems are used

  Compare inodes used in linux and ntfs

Compare HFS+, Ext3fs, and NTFS. Compare inodes used in Linux and NTFS. Are they the same? If not, which one is better

  Provide examples of famous assignments that have failed

Discuss the examples of famous assignments that have failed because of relatively simple errors?

  Present figures in power point presentation slides.

I need link for table of content, list of figures, list of tables. Few sections there is no link. Recently i updated the document. Could you please link it.

  Write a dos-like shell on top of the bourne shell

Write a DOS-like shell on top of the Bourne shell to satisfy the DOS users -  Reference to the Linux commands of adduser and useradd.

  Database statistics

In an RDBMS, how are the three phases parsing, execution, and fetching carried out? In general, in which phase would you tune a database? Determine database statistics and why are they important.

  Design and implement the disableuser.sh script

disableuser.sh -m : Does not disable login (by the operating system), but changes the user's login shell to a script that just writes the quoted message to standard output and then exits.

  Give number of available unique instructions

give max indrectly addressable mem capacity in bytes.

  Network design question

Bench Fitness Centers has 8- i ndividual  locations in this area. Most of the centers have the similar equipment and provide the same services,

  Discuss how soap related to xml and http

Discuss how is SOAP related to XML and HTTP? Suppose that your readers are familiar with browsing the internet, but they have no technical knowledge of how its works behind scene.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd