Sep 01 2007
sudo
The root or superuser.
All Unix varieties are very versatile operating systems and within each of them the most powerful user is the administrator (known as the root or superuser). Root is the guy who can use the system with the most freedom and also the guy who can really screw things up when doing something wrong, and since he is enabled to erase accounts, filesystems and wreak any and every kind of havoc –including killing the system.
That’s why the root account can sometimes be demmed too powerful/dangerous for every day use, something like driving a Mercedes to go three blocks down the street to get a can of soda. So it’s no surprise that some distros, specially those not aimed to expert users deactivate the root account by default –Ubuntu and Freespire are two such examples.
The safe thing to do in any distro is to get everyday access as a normal user and become the root only when dealing with a task that really needs administrative privileges. You don’t need to log in as root for that: as long as you have the root’s password, you can run any administrative task using the sudo command.
A simple example: creating a new user with sudo.
You need to do something that needs root privileges, say, create the new user joe and you logged in from you every day not-ultra-powerful account. What you do is to call the task through the sudo command:
sudo adduser pepito [ENTER]
then the system will ask for the root’s password, and that’s it, joe is added with the system’s default profile for new users.
Starting a new shell session as a superuser.
Sudo turns a bit irritating when you need more than a couple of lines as super user. Still, you don’t need to restart your session, you can just start a new shell session as a superuser and knock yourself up. Just type:
sudo /bin/bash
Not always optional.
Even if you are used to log in as root all the time, knowing the sudo trick is still useful because not all distros will allow you to log in as root.
Ubuntu, which has become exceedingly popular, has no root user activated by default so all the interesting stuff has to be done through the sudo command. Freespire is in a similar situation and, generally speaking, most LiveCDs put the root user in the background.
