Freely Scripted Soul

May 30, 2007

Using Root Privileges in Ubuntu

Filed under: Ubuntu — Roshan @ 2:13 am

By default, Ubuntu doesn’t allow the user to log-in as “root” (administrator). However, some tasks like installation require root privileges.

 

First of all, during installation of Ubuntu, you will not have specified the “root” password. So first you need to change that. Go to (System -> Administration -> Users and Groups)

 

 

Click on “root” account and then click “Properties”.

 

 

Observe in “Set password by hand” that a random 8 character password has been generated. This will be done everytime you come to this screen. So, now change it to the password you want and click “OK”. Close the “Users and Groups” window.

 

You can use root privileges in 2 ways:

  1. By executing commands in the terminal

  2. By enabling “root” log-in

 

I prefer to use commands as it is a cool and powerful method; a method which has plenty to offer in terms of learning. However, if you feel it is difficult to use commands, you can enable “root” log-in (which isn’t recommended).

 

A word about commands in the terminal: commands and arguments are CASE-SENSITIVE i.e. a folder named “roshan” is absolutely different from a folder name “Roshan”. This is the reason why, by default folder names are in lower-case and most users prefer it that way.

 

To use “root” privilege for any command in the terminal, just prefix “sudo” before the command which means “do as super user/root/admin”.

e.g.,

sudo apt-get install beryl ” will download and install “beryl” package

sudo dpkg -i * ” will unpack and install all the packages in the current directory

 

Suppose you have a series of commands to execute using root privileges, then you can log-in to the super-user shell by giving the “su” command at the terminal:

su

Now, execute all the commands normally.

e.g.,

apt-get upgrade ” which will check for package upgrades

dpkg -i *

Once you are done, you can exit super-user shell, by pressing “ctrl+d” or by typing “exit”. You can even close the terminal directly if you want.

 

 

If you very lazy to type “su”, you can enable “root terminal” by customising the main menu, where all the commands you type will be performed with root privileges. By default, “root terminal” will be hidden in the (Applications -> System Tools). To activate it, you need to customise the Main Menu. To know more about customising Main Menu, click HERE

 

To enable “root” log-in, launch Login Window (System -> Administration -> Login Window)

 

 

Go to “Security” tab and tick “Allow local system administrator window login”. Close the window.

 

From next time, you can log-in using “root” username and password and perform all tasks with root privileges.

 

Advertisements

6 Comments »

  1. […] HERE for help on using root […]

    Pingback by Basics of Ubuntu « Enjoy the world of Magic — May 30, 2007 @ 2:25 am | Reply

  2. coooooooool boss…. i wish u make postings on fedora6 as well….

    Comment by pavan — May 30, 2007 @ 6:42 am | Reply

  3. Someone is posting lots of how-tos 😉
    Actually,you dont need to modify the root password and use it. The user which was given during installation itself is the administrator. Just do sudo and give that password that should work fine.

    Comment by Rk — May 31, 2007 @ 12:21 am | Reply

  4. @pavan
    i havent worked on fedora except in col(which actually cant be counted 😉 )
    so its ONLY ubuntu from me.. 😀
    there wil be some similarities but there r lots of differences too..

    @rk
    bro.. u r right 🙂

    Comment by Roshan — June 3, 2007 @ 11:21 am | Reply

  5. helo sir i wanna know how to unistall ubuntu 9.04 totaly from my system ….and i m using xp & linux in same computer …

    Comment by pawan — February 10, 2010 @ 1:20 am | Reply

  6. […] Using Root Privileges in Ubuntu How do I gain root privileges? […]

    Pingback by Superuser (Root) – Buntu Bunny's Beginners' Linux Links — November 24, 2013 @ 11:44 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: