Question

In: Computer Science

In Linux Can you reboot the system as a normal user? Explain your answer. Draw on...

In Linux

  • Can you reboot the system as a normal user? Explain your answer. Draw on the concepts discussed in this course to justify your answer.
  • How do you change the system run level? Changing the system run level means switching from your default run level to run level 1 and vice versa.

Your response to each should meet the following criteria:

  • It should be a minimum of 1 paragraph (five single-spaced sentences).
  • If you are using outside sources, you need to acknowledge your sources with APA citations.

please type your answer, I will rate you well.

Solutions

Expert Solution

  • In Linux ,only super user(admin) can reboot or shutdown the systems.As you ask in the question how can i reboot the linux system as a normal user that is to modify /etc/sudoers.By modifying this, giving permissions to every user(normal user)  that is in admin group can execute following commands without being ask for a password.

sudo halt

sudo reboot

sudo poweroff

Modify the /etc/sudoers by adding following lines:

%admin ALL=NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/poweroff

The above line represents that all users in admin group is allowed to execute halt and reboot the system

and add yourself to the admin group.

  • Runlevel can be defined as a part of Linux OS which determines the processes that need to be started at system startup.The processes that need to be started by "init"which is the first processes that gets executed with PID 1and at system bootup are determined by the default runlevel that is mentioned in /etc/inittab file.

The defualt runlevel starts from 0 and end with 6.This means there are 7 runlevels in any Linux system.

0 System halt (the default level)

1 Single user mode(runlevel 1)

2 Multi user mode without networking

3 Multi user mode with networking

4 Not used/special purpose

5 Multi user mode with GUI

6 System reboot

As you ask in the question how can i change the system runlevel.For that my answer is ,all runlevels are defined in a directory "/etc/rcX.d",where X corresponds to the runlevel.

Changing the Viewing the run level:

You can view the default runlevel of the system which is defined in the file /etc/inittab.

#grep ^id/etc/inittab

id:3:initdefault:

As you can see from the above output,the default runlevel is 3.If you want to change this to runlevel 1,edit the /etc/inittab file with the following line:

id:1:initdefault:

You can change the runlevel in otherway,by using the command telinit(stands for telling init 0 change runlevel).This actually signals "init" process to change the runlevel.

#telinit 1


Related Solutions

[Linux permissions] Suppose that you are a superuser on a Linux system, and there is a...
[Linux permissions] Suppose that you are a superuser on a Linux system, and there is a file “/home/alice/foo”, which is owned by an ordinary user Alice. You need to give a permission to read a this file to an ordinary user Bob, but no one else (of course, you as superuser will be able to read it too). Explain how you will do it. Note: You do not have to provide specific commands, just a short description will suffice. [Limitations...
[Linux permissions] Suppose that you are a superuser on a Linux system, and there is a...
[Linux permissions] Suppose that you are a superuser on a Linux system, and there is a file “/home/alice/foo”, which is owned by an ordinary user Alice. You need to give a permission to read a this file to an ordinary user Bob, but no one else (of course, you as superuser will be able to read it too). Explain how you will do it. Note: You do not have to provide specific commands, just a short description will suffice.
Linux Commands 8.How would you find out information about systemdon your Linux workstation? 9.A user would...
Linux Commands 8.How would you find out information about systemdon your Linux workstation? 9.A user would like to put the firefoxprogram in the background –what would you type into the command prompt to do this? 10.For the program in above, how would you bring it back into the foreground? 11.What is the fork()function call? 12.In Linux what command sequence do we enter to stop a program? 13.What is the UIDcolumn in the output of the command ps -ef? 14.What is...
Linux Create a simple 'user' file -user name, user id, some few other fields (at your...
Linux Create a simple 'user' file -user name, user id, some few other fields (at your discretion). Name it 'users'. Enter about 10 entries there. Create a simple 'user_data' file -user name, phone, address etc at your discretion.. User names in both files should match. So there would be 10 users in both files. You probably want to do these files as tab -separated, rather than space separated.
please, in your own words answer the following question - What conclusion can you draw if...
please, in your own words answer the following question - What conclusion can you draw if you were given the following two market ratios? SBUX MCD PE ratio 17.67 15.74 Market to Book Ratio 6.14 6.12 - and What are the disadvantages of using ratio analysis? (explain at least 5 disadvantages )
Can you show how to draw the normal curve for each of the problems and label...
Can you show how to draw the normal curve for each of the problems and label it as well? Heights of MEN in the U.S. are normally distributed µ = 69.6 inches with σ = 3 inches. -________ percent (to nearest %) of men in the U.S. are either shorter than 5 ft. or taller than 6 ft? -In a group of 150 U.S. men, approximately ________ of them should be shorter than 65 inches. -A male height of _______________...
Can you show how to draw the normal curve for each of the problems and label...
Can you show how to draw the normal curve for each of the problems and label it as well? Heights of MEN in the U.S. are normally distributed µ = 69.6 inches with σ = 3 inches. -________ percent (to nearest %) of men in the U.S. are either shorter than 5 ft. or taller than 6 ft? -In a group of 150 U.S. men, approximately ________ of them should be shorter than 65 inches. -A male height of _______________...
Linux Directories, File Properties, and the File System in C Understanding Unix/Linux Programming Your version of...
Linux Directories, File Properties, and the File System in C Understanding Unix/Linux Programming Your version of mv command The mv command is more than just a wrapper around the rename system call. Write a version of mv that accepts two argument. The first argument must be the name of a file, and the second argument may be the name of a file or the name of a directory. If the destination is the name of a directory, then mv moves...
What is a normal distribution? Draw and label a graph of a normal distribution and explain...
What is a normal distribution? Draw and label a graph of a normal distribution and explain the relevant terms. How can the mean and standard deviation be used to predict outcomes according to this distribution?
Upgrade your UBUNTU Linux system and document the steps that you took. What events, if any,...
Upgrade your UBUNTU Linux system and document the steps that you took. What events, if any, were logged? Next, search the repositories for the application nginx. If it’s not installed, install it. Document the steps you took.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT