Sunday, November 30, 2008

The reality of being Root

Linux is terrific from an administrators point of view.

It allows so many ways to modify, manage and otherwise maintain a solid, stable, smooth running system.

There are a prolific number of applications and tools to control even the most minute of details in a Linux system.

Incredibly, the ways to access these apps and tools are myriad as well.

Some can be accessed at a normal user level.

Some can use the "su" ( Switch User ) which will let a person logged into a normal user environment to assume another users status and permissions, even that of the notorious "SuperUser" AKA Root.

Yet another way is log in as Root directly. This is the equivalent of becoming the ultimate authority on that system. Root has total and unquestioned access to every single detail in that system.

Now, there are a large number of people who off the cuff will want to help "new" to Linux administrators by telling them to NEVER log in as Root, especially in a GUI environment. All that power can be a curse more than a blessing and they think they are protecting you from yourself.

"What If" You made a mistake?

"What If" You clicked the wrong button?

Well, if you make a mistake in Linux while logged in as root, you may be in for a lot of work and headaches ahead of you.

Not only is Root powerful, it is often permanent. When you as Root decide to delete something, it stays deleted.

This can be not fun.

For the most part though, the absolute "need" to log in as Root is far and few. Simply using su in a console or non GUI environment will suffice for the majority of tasks requiring that level of permission or access.

In, out and you're done. No harm, no foul.

There are some limited circumstances however, that require logging in as root to properly access a certain app or function that su will not suffice. In those circumstances, the last thing users need to be is paranoid or scared of logging in as Root.

Being afraid or uncertain will make users even more prone to making errors because they already have it in their mind that they will make a tragic error. Oops, butterfingers.

The last thing a 'good' admin needs to be is nervous or uncertain. As the admin of any system, you are expected to be capable of managing the system in any and every way necessary to provide a functional and productive system. That means, my friends, being able to work confidently as Root, if necessary.

Some people give the advice that using a GUI as Root is nearly a crime. I would agree that the odds of making a mistake are increased. Instead of typing a line command in error, all it takes is clicking the wrong icon. Ooops. IF, one needed to log in as Root in a GUI setting, that is even less necessary than the need to log in as Root to a console environment. However, there are those who will do it anyway, because they want to pop in for a quick GUI change of permissions to a file or directory. Copy files to a protected or otherwise inaccessible location. It gets to be an easy fix and a bad habit. Is it guaranteed to hose your system? No. Is it recommended? No.

In terms of security, the great thing about Linux is that you can run a Linux machine without X being started at all. Unless you want it to. Most often, those who run servers, boot to a runlevel that does not start X, but X can be started if one so chooses. Do what you need/want to do for the limited time, log out and exit X server. Those possible alternate routes and "backdoors" accessible via GUI are gone. Not too hard if one pays attention to what they're doing.

Perhaps the best advice I can give to a potential new admin of a Linux system is to set up a completely isolated, and "oops-able" system to practice working in the various levels such as su and Root.

That way, you build confidence, get to know your way around, see what happens when you goof, find out how to, if it can be. fixed. Using a LiveCD based distro for this test system is highly recommended, as getting a system back up in no time is easier achieved with that.


You can use other methods of accessing Root powers with Sudo. Especially in a server environment. Sudo allows administrators to determine which other users can have access to specific commands and permissions to complete tasks without actually logging in a the root user. This is one of the ways that can be preferable to actually logging in as root if the presence of the actual Root user is not needed.

Linux is nothing to be afraid of. Once you get to know your way around and comfortable with it, it can be a best friend.

The last thing Linux needs is people wandering about crying about how the sky will fall if you log in as Root. This is just another way of building fear, uncertainty and doubt.

Linux needs confident, comfortable and calm admins, capable of working and getting things done in any environment.

You can do it. I got your back.

0 comments: