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: