@shijitht

August 5, 2010

Enabling root in Ubuntu !

Filed under: Commands — Tags: , , , — shijitht @ 11:15 pm

If you notice, you will find that Ubuntu never asks for a root password while installing. The thing is, root account disabled as default. This is not true in almost every case. So how can we enable it ?. sudo can do the trick. It means ” Super User DO “.If you are not a power user, you don’t need to activate root account. If you are ever asked to type a root privileged command, you could use  sudo. To run using sudo
$ sudo  < command to execute >
This will prompt for a user password.

If you are someone having lots of fun in terminal, activate the master.
To enable
$ sudo passwd
This will prompt for new root password and once you confirm it, you can start using root account. There is another option, type  $ sudo -i  for a root console.

Disable root by
$ sudo passwd -l root

For more administrative task use visudo, a privileged command which can change the power of users and groups.

Advertisements

6 Comments »

  1. Sorry but you worded this post poorly… I couldn’t tell if you were trying to show how to gain super user privileges or activate full root control… I will respond to both.

    For executing administrative tasks in Ubuntu can go to the terminal type sudo in front
    of it and hit enter for example sudo apt-get update after you hit enter you will be asked for your password. after you enter it will execute that task as having root privileges. As for Visudo the proper command in Ubuntu is gksu

    There is a good reason why Ubuntu doesn’t ask for a root password. If you had the ability to access the a full root desktop there would be practically nothing proventing viruses from infecting the computer. That is another misconception about Ubuntu, you can get viruses but because of the way it is set-up you have to enter your password to authenticate the action. This prevents viruses from being able to do damage to your computer. If you you enable to the root account you will have complete control.

    Comment by technologyunit — August 5, 2010 @ 11:49 pm

  2. Actually i was trying to explain both(activating temporarily and permanent). Apologies for my bad English. These two have significant difference
    visudo (8) – edit the sudoers file
    gksu (1) – GTK+ frontend for su and sudo

    I meant to use visudo to edit sudoers file so that we can change privileges.
    I never saw a linux system attacked by virus. All other normal distros which don’t have this security feature, work perfectly well. Actually what is the difference other than this enabling ?. I appreciate your ubuntu love. I am a GNU/Linux fan and I like everything it has to offer.
    http://ubuntuvideotutorials.wordpress.com/ is fabulous. I can lean a lot from there. Thanks a lot for your comment and works.

    Comment by shijitht — August 6, 2010 @ 1:17 am

  3. There were approximately 800 viruses for linux in 2005… I estimate there are approximately 2000 today. But viruses are to severely limited by the requirement for administrative privledges that require the users password. The bigger problem is rootkits which bury themselves in your computer and are generally used in botnets. These are less common but are more destuctive. You may not even know it but your computer could be helping infect hundreds of windows and macs. Knoppix for example gives you root access by default and is one of the most insecure linux distrobutions. It is easy to fix this and not a very complicated procedure, it is very simple to create an administrative account which can execute root tasks but must verify them through entering the users password password first. By activating the root privileges on ubuntu a malicious script wouldn’t need permission from the user to execute itself and infect your computer. Using sudo or gksu are much more secure for accessing root for a single task. Use su for accessing a root-shell. I wouldn’t recommend anyone use the root-account as there are easier and more secure options. (note I am sorry but you may have over complicated the procedure for enabling root account in ubuntu {you can do this from the users control}) Thanks for the compliment.. Your English isn’t bad at all but they way you worded it you didn’t make it clear to a reader what they were doing with the codes. How experienced are you with Ubuntu linux or other linux OSes? Sometimes people start with a more complicated Disto and come to Ubuntu.

    Comment by technologyunit — August 6, 2010 @ 2:04 am

  4. About four years during engg graduation. A strong Debian fan at first, then moved to Fedora and currently Lucid(Desktop)+Fedora(Laptop). I have a suggestion, site should mention Ubuntu One because it is one of Ubuntu’s distinctive feature. 🙂

    Comment by shijitht — August 6, 2010 @ 2:28 am

  5. I do have a post on ubuntu one. I am currently working on a weekly sticky post that brings up old posts so they get recycled. If you like create a list of tutorials you think I should cover and send me a link on my suggestions page. Thanks for the suggestion, even If I have already done it helps me think of other things that are related to them… Ill take a look at your site and I like it enough I will put a link on my site.

    Comment by technologyunit — August 6, 2010 @ 2:33 am

  6. Of-course. i will do. First I thought, the site is official because of its looks and contents. Nice design.

    Comment by shijitht — August 6, 2010 @ 2:48 am


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

Blog at WordPress.com.

%d bloggers like this: