[P1] Logging in as root

Richard McKay richard.mckay1 at virgin.net
Sun Feb 2 16:12:59 PST 2003


Meg St. Clair wrote the following:

> While I enjoyed your analogies, they don't answer the question: What exactly
> will happen? I get the, "it's bad, don't do it, there are better ways". But
> I was always an obnoxious child. I've never been willing to take No as an
> answer with out a reason.
> 
> If I just log on as root and delete a file (which I find a lot easier to
> remember how to do than the syntax of sudo), what specific bad things will
> happen?

If you are responsible and think twice before acting (ie pressing return)
then absolutely nothing bad will happen...however...

Human nature dictates that we will inevitably act first and then think about
what we just did...if you do this with Unix and root then because it gives
you ultimate power and does not ask "have you really thought about this
action before you press that key?" it can be terrible as then you could need
to do a clean install and reconfigure the entire system or worse! (see
below). If you do not make money with your iBook or are not running a server
for others to get at their data or other items it will not be of as much
importance...as a traditional mac user we can accept that we have needed to
do a reinstall once in a while...that's why we make backups...but if there
is a lot of valuable information or money involved with the equipment being
operational then the risk of a crash or reinstall is very expensive or
irreplaceable...this is why they always say don't do it...if you don't use
root the chances are much lower that you can really mess up the system (with
normal setup you may indeed have to delete the user and create a new one but
the system itself is still churning along happily)

If you are willing to do a reinstall and will not lose money by not having
an operational system for the time it takes to reinstall then by all means
have a good play (I am a firm believer that one needs to thoroughly thrash
things before respecting them, you won't learn anything if you don't try it
out...it will go wrong somewhere but hey you made a backup, right? and are
accepting the fact that it *will* go wrong sometime so its not that terrible
when it does crash and it allows you to learn more about the system normally
reserved only for other eyes...It is a good way to learn about the unix
environment and the fantastic advantages that a powerful and open system
allows. Any good system administrator worth her/his salt will tell you that
they also had a good look around and really screwed things up and required a
clean install the first time or two, but how else will you learn the system
better than the usual GUI interface allows...

...security is a whole other issue...if root is not activated then it will
be considerably harder for hackers to gain control of your laptop as many
attach methods are based on having root power (thus the normal methodology
of only using sudo to do these tasks...after the task you are logged out of
root automatically and root doesn't need to be activated to do any of the
tasks...

...besides the above normal thoughts of preventative medicine, there is one
real danger that potentially can not be reset by a clean install...

If you start changing too many configuration files or such hidden files (.
files) then the potential is there to change the settings for such things as
modem or sound or other hardware like ethernet or monitor settings and the
services that use them...this would be unlikely but you could potentially
set the volume to damaging levels to the speakers that a normal user would
never have access to, or the modem could be configured wrong and cause
serious problems, the display settings could cause damage to the monitor but
again it would require a good knowledge of which files and an editor to view
them and change them...The golden rule is really important with unix as it
*really* gives the user the power to do *anything* no matter how
damaging...Think twice, act once...

Most unix people have nightmares about having to reinstall the entire OS and
its hard won sleekness and custom settings of files...etc...the other
reasons are mostly based on financial loss by not having an operational
system...As a mac user that wants to understand the beauty of the OS and
what is going on behind the scenes have a go...but be prepared to reinstall
if all starts to go weird or things don't work anymore...educate yourself
about what the command you are about to type is really going to do...before
you hit return and nothing bad should happen regardless of what user you are
logged in as...

My 0.02

Richard
--



More information about the iBook mailing list