LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can 'root' harm the computer? (https://www.linuxquestions.org/questions/linux-general-1/can-root-harm-the-computer-151582/)

LinuxSeeker 02-28-2004 12:25 PM

Can 'root' harm the computer?
 
Before I start, I need to make clear that I am not a cracker. I am just an informatics teacher and I want to show to my students what the superuser can accidentaly (and generally) do.

I need to know what are the common mistakes that a user can do while working as 'root', that could harm the system (including changing the file permissions).

If it is possible, I want to end the lesson by making a reference to a command that can make the system unbootable (I think that this is supposed to wipe the file system?) and use this command in one of the computers to make the students realize that working as root is not always safe.

Note: I need to have the lesson prepared by 3/2 (m/d), so please, try to help.

llama_meme 02-28-2004 12:50 PM

rm -r /*
would delete everything on the computer, but would you actually want to do this?

Alex

LinuxSeeker 02-28-2004 12:57 PM

It will be just an example the computer contains no other data apart from the distro.

XavierP 02-28-2004 01:41 PM

You could try showing what happens when a user tries to delete a system file and what happens when root does it.

acid_kewpie 02-28-2004 01:58 PM

Quote:

Note: I need to have the lesson prepared by 3/2 (m/d), so please, try to help.
we are not here to do your homework... all the information is out there.

Joey.Dale 02-28-2004 02:14 PM

try rm -rf / home/whatever

the space is a typeo. This will do the same thing as rm -rf / linux will stop at the space and that will delete your whole file system. I know this b/c I have done this.

-Joey

bnice 02-28-2004 02:17 PM

Quote:

Originally posted by acid_kewpie
we are not here to do your homework... all the information is out there.
Cynic: Someone who looks through rose colored glasses with a jaundiced eye.

Quote:

Before I start, I need to make clear that I am not a cracker. I am just an informatics teacher
Code:

rm -rf /etc
will pretty much render your system useless as well. (silently)

A Cow 02-28-2004 02:37 PM

here.. il make you a lesson

root shouldnt be used because they can do anything or change anyhting.. root should only be used if you need to do admin processes.. else.. you can realy mess up your computer.

end of converastion

SciYro 02-28-2004 06:22 PM

ok i run as root non stop (cuse i dotn ahve the tools to make new users, (shadow-utils), so i know root is pretty safe if ya knwo what not to do, heres something i did to make the system boot, but giv like 1000 errors

rm -fr /share that will delet terminfo, needed by most programs on the comand line

other was to mess up your system:

rm /etc/rc.d/rc.si
rm -r /[a-z]

and heres onea my favs :
ok if the /var is on a difrent partition, then dont mount it at boot time, and make sure syslogd is called (it should be)

or
mkreiserfs /dev/hda1
rm /bin/b*

rm /etc/lilo.conf
lilo

fdisk /dev/hda

lone_nut 02-29-2004 04:17 AM

If your try to add a user, and run the following command:
echo 'foo::254:254:foo foosen:/home/foo:/bin/bash'> /etc/passwd
it will wipe out the entire file /etc/passwd and put the following line in as the only one in the file. To add a user, (not the best way, but it is possible)
run
echo 'foo::254:254:foo foosen:/home/foo:/bin/bash'>> /etc/passwd
Wich will add the line to the end of /etc/passwd instead of clearing the file.
The difference is that in the latest example you use to > instead of one.

urzumph 02-29-2004 05:10 AM

simply change the default runlevel to 0 (shutdown IIRC) or 6 (restart, IIRC)
The machine will boot, then shutdown / restart

SciYro 02-29-2004 06:09 AM

theres a small problem with me lone_nut, i dont ahve shadow-utils, not that its needed to make a enw user, but it is needed for the program "login" wich is used by (whatever)getty to login into the program, so right now instead of runing those login progrmas i just have the computer load up bash and sign on (and it signs in as user 0 (you call it root, i renamed mine), so untill i get linux to conect to the internet ato downlaod the shadow-utils i cant have other users (as much as i would like one), im a bit lazy as it requires soo amny comands to repapre the conection, so iv been holding off on it, wich is ok sence im still trying to cram out a few things and add needed programs so i can do stuff in my linux laptop


and i just thought of this,
compile a nice new kernel, and copy the bzimage to /boot then restart the computer (note: only copy the bzImage to /boot nothing else :):):))

natalinasmpf 02-29-2004 07:14 AM

Even if you know what to do as root, its the other stuff that can hurt.

A non super-user just provides a comfort zone for mittakes. Believe it or not, we're human, uh, we can make mistakes.

Or even without us knowing - suppose if a Linux virus (no matter how rare) or some kind of spyware leaks through the loophole in your browser, it can happen, but it can't plant itself into boot because its not a super-user. You really should not surf the web as root, because its not only you - but programs that can make mistakes.

Well at least thankfully the /etc/rc.d/ is easy enough to understand and edit, not like a *certain* registry...

SciYro 02-29-2004 09:28 AM

yea i was planing on geting the utils, but iv been puting off retrying to conect to teh internet, but when i do actauly use the internet in linux the first thing i intend to do is get those hard to get utils , compile em and change the permissions so i know its safe to use the compter for day to day stuff, iv messed up my computer plenty of times jsut installing it so i defidently wont be using the super user for day to day stuff, (um besides compiling, for me thats also day to say usualy :) ), in fact i think ill go try to get a internet conection right now cya

uniQ 02-29-2004 03:19 PM

I did this once as SU (On the advice of an instruction):

Cat /dev/mem > /dev/null

and as if taht wasn't bad enough

cat /dev/null/ > /dev/mem

Roaylly XXXXed my system, had to resinstall.

-uniQ


All times are GMT -5. The time now is 04:25 PM.