Jump to content

Running your system as root user


ianw1974
 Share

Recommended Posts

I've written this post as humourous as I can think of right now, but hopefully it gets the point over. This isn't directed at anyone in particular, but more as of an informative and humourous reason not to run your system as root user, than compared to a normal user.

 

In case you don't know, a standard user doesn't have full system privileges, and can only work with their own home directory. The root user has access to the whole system, and can make changes/delete everything.

 

The Story

 

I'm new to Linux, I've not been using it long. In fact, this is my first post on a forum, and since then I've written another 6800 posts with all sorts of problems I'm experiencing.

 

You see, when I was using Windows, I had full admin rights to my system. I could do anything I wanted, anywhere I wanted. When I started using Linux, I found out about normal versus root users, and I didn't like having to type "su" all the time and enter the root password, each time I wanted to make changes to some files, or delete something. I thought I'd do away with the normal user, and just run as root. I had been trying to find out how to make my normal user a root user, but wasn't sure how. I preferred using my name to login with, but I can live with root. It's a bit like Administrator in Windows.

 

Anyway, I was getting short on disk space, so I thought I'd take a look at all my files. This is what I noticed:

 

[ian@esprit ~]$ ls -l /
total 18
drwxr-xr-x   2 root root 2536 Oct 23 19:09 bin
drwxr-xr-x   3 root root  256 Oct 22 13:04 boot
drwxr-xr-x  11 root root 4080 Oct 23 15:47 dev
drwxr-xr-x  82 root root 5872 Oct 23 19:10 etc
drwxr-xr-x   6 root root  128 Oct 22 13:22 home
drwxr-xr-x  10 root root 3976 Oct 23 19:05 lib
drwxr-xr-x   2 root root   48 Feb 11  2006 media
drwxr-xr-x   2 root root   48 Feb 11  2006 misc
drwxr-xr-x   2 root root   48 Feb 11  2006 mnt
drwxr-xr-x   2 root root	0 Oct 23 15:47 net
drwxr-xr-x   2 root root   48 Feb 11  2006 opt
dr-xr-xr-x 103 root root	0 Oct 23 17:46 proc
drwxr-x---   4 root root  448 Oct 23 19:06 root
drwxr-xr-x   2 root root 5640 Oct 23 19:10 sbin
drwxr-xr-x   2 root root   48 Feb 11  2006 selinux
drwxr-xr-x   2 root root   48 Feb 11  2006 srv
drwxr-xr-x  11 root root	0 Oct 23 17:46 sys
drwxrwxrwt  13 root root  600 Oct 23 19:16 tmp
drwxr-xr-x  14 root root  360 Oct 22 12:59 usr
drwxr-xr-x  19 root root  480 Oct 22 13:40 var

 

I noticed this directory called "bin". I think this must be my user equivalent of "Recycle Bin", so I deleted this as it was taking up some space. I also noticed "sbin", and figured this related to superuser, so must be root's "Recycle Bin". So I deleted this as well.

 

"dev" didn't look to big, but I don't do development or programming, so I deleted this too. "var" sounds like variables and must be development stuff, so I got rid of this as well. I'm not entirely sure about "etc" but I think it must be additional extras or leftovers, so I figured these could go as well. I noticed "misc" as well and this must be the same as "etc", so that's gone too.

 

I also deleted "srv" as I'm not running any server stuff, and "usr" as well. I don't even have a US Robotics modem, so don't know how that got here!

 

"home" and "media" are important, I know my data is here, and media is where all my music is, so I don't want to be deleting all my mp3's.

 

I managed to get quite a bit of disk space back! A few applications stopped working, and I thought Linux was being typical of Windows, and so I rebooted. But I'm having problems getting my system back up and running, and I really can't figure out why?!?

 

The Facts

 

All directories that I've mentioned in the above story are critical to your system stability. Of course, my story is being a bit extreme, but you never know how true this story could fit.

 

Running as root, you could accidently delete something that is very important. And doing so, could stop you booting your system completely. Just like my ficticious newbie in my story.

Link to comment
Share on other sites

Actually, I have seen a part of this happen in a different forum, where a newbie was encouraged to run as root!!

 

:wacko:

 

Sorry, that's all I gotta say on that matter :D

 

:-) I'd encourage every rookie to run as root only. By this he'd show as newbie, so he could sue the seller of his (proprietary) system on every error he has.

 

Happy days to you!

Link to comment
Share on other sites

You don't have to be a newbie to do stupid things :lol:

 

When I upgraded from 2006 to 2007, there was a problem, mostly due to the upgrade process getting lost because of packages from MDE repository. The most immediate problem was that glibc could not update...

 

To make the story short, I thought I'd just force-remove the old glibc, and then install the correct one, and finally continue the upgrade process from there...

# rpm -e --nodeps glibc
...
# urpmi glibc
urpmi: command not found
# rpm -i /tmp/glibc...rpm
rpm: command not found
# ls
ls: command not found

You get it...

 

That was a cool rescue practice I got :lol: Anyway, I got the system back up and running (and rpm database cleaned).

 

Yves.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...