Re: Why not use root all the time?


Subject: Re: Why not use root all the time?
From: civileme (civileme@mandrakesoft.com)
Date: Tue Apr 30 2002 - 12:41:58 AKDT


On Tuesday 30 April 2002 09:58 am, Greg Madden wrote:
> On Tue, 2002-04-30 at 09:12, James Zuelow wrote:
> > > I can do? Promoting myself to su doesn't make me any smarter. Are
> > > there any security concerns I am unaware of? Is there anyone out there
> > > that uses root all the time or am I just living on the edge? Thanks.
> > >
> > > root
> >
> > Try this as a normal user:
> >
> > cd /
> > rm -rf *
> >
> > Then try it as root.
> >
> > You might not intentionally issue the above commands, but unless you are
> > 100% sure you never make a typo, only use root when you need to. It
> > will save a lot of grief in the end.
> >
> > Cheers,
> >
> > James
>
> Good point, while that particular command is not one you might do, a
> 'rm *' in the wrong directory could erase some valuable date. Maybe just
> don't do wildcards.

Ummm, actually if you need to do rm -rf then don't do it. For example, if
WindowMaker has become hopelessly tangled you might use

rm -r ~/GNUstep -f

Which recursively and forcefully removes the configuration directory for the
user (will be rebuilt when you login to WindowMaker again). The difference
is this

SCENARIO:
You are thinking of removing a directory called /isomnt which you were using
for storing iso images and you are going to re-use the space for something
else.

You type just this far....

rm -rf /

and someone distracts you or an earthquake starts and you scramble for
safety anfd the Enter key is bumped, or the family cat decides it is time for
attention and lands on your keyboard to get your attention and hits the enter
key for you.

...And your last backup was a distant memory..

...And the cat drowns in your tears or ends up in the frying pan.

But if you habitually do

rm -r (directory name or wildcards) -f

and your system is one of the many that installs the default alias of rm to
rm -i (for your protection). then of course the first thing that happens is a
request for confirmation if you got to

rm -r /

and the enter key was bumped, and you have a chance to save your system.

Civileme

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Tue Apr 30 2002 - 12:42:10 AKDT