x
Loading
 Loading
Hello, Guest | Login | Register

Using Power Wisely

One Linux user is special: the superuser or root. If you manage any number of Linux boxes — even just your own desktop workstation — you’ll inevitably need root access to configure or tune the system or manage system resources. But with great wizardly powers also come risks. This month, let’s see how to manage root access and learn some powerful tricks to juggle Linux processes and shells.

One Linux user is special: the superuser or root. If you manage any number of Linux boxes — even just your own desktop workstation — you’ll inevitably need root access to configure or tune the system or manage system resources. But with great wizardly powers also come risks. This month, let’s see how to manage root access and learn some powerful tricks to juggle Linux processes and shells.

What is Root? Who is Root?

As last month’s column “Sharing Files (Carefully)” (available online at http://www.linux-mag.com/2002-11/power_01.html) explained, each account on a Linux system has a name and a corresponding user ID (UID). The root user has UID 0.

The Linux kernel gives special privileges to any process running with UID 0. These processes can read or write any file, no matter what its access permissions are. The root user — actually, any process with UID 0 — can also become any other user without entering a password. Root processes can also access any network port. The UID 0 is the key to superuser power.

Becoming Root

So how do processes — shells, text editors, and so on — get root privileges? One way is to log in with the username root. When any user logs in successfully, the system starts a process (a shell or a window system) running with that user’s UID. That first process’ UID propagates to all child processes it spawns. So, if your window system starts as root, all…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. KDE 4.4: Does It Work Yet?
  2. Writing Custom Nagios Plugins with Python
  3. Power Up Linux GUI Apps
  4. Tweeting from the Command Line with Twyt
  5. When Memory Serves You: Using ramfs and tmpfs
Follow Linux Magazine
Rackspace