0

I installed Ubuntu 18.04 just now. I removed windows 7 and installed Ubuntu as my primary OS. And the problem is it asks root password every time when I make changes in it. Thank you!

9
  • 2
    Can you give an example of a change you're trying to make? What you're describing is normal, the root account is the only account that has root access. If you need to use a command that requires root access, you prepend sudo, then use your regular account password. Nov 1, 2018 at 12:59
  • I'm using only one account in my PC. Is there any possible way to change my account type into root account?? Or how can I get root access to my account? Nov 1, 2018 at 13:02
  • 4
    Please read these before you try anything. Why is it bad to log in as root? / Why is there no option to login as root? Nov 1, 2018 at 13:05
  • I installed VLC player using Ubuntu Software. I'm new to Ubuntu. I want to change my account type as Administrator account in windows. Nov 1, 2018 at 13:07
  • It already is, technically. Root restrictions are not there to stop you doing things, they're there to protect your system from the applications you run. This is why sudo exists. The system asking for a password to change a setting is no different from UAC in Windows. Nov 1, 2018 at 13:08

1 Answer 1

0

Source:

In standard Ubuntu, root logins are not allowed, neither from the GDM (graphical) login manager, nor from the text console (i.e., the one you get if press Ctrl+Alt+F1).

In order to perform root (i.e., administrator) operations you have to use the sudo command in a terminal, or any GUI equivalent of it: these will ask you for your password and then perform the requested privileged operation (and only that one).

The reason for this behavior is, as others have pointed out, that performing root operations is inherently risky and the number of operations really requiring root privileges is comparatively small: by using this sudo approach you are running most of the time with a unprivileged account (i.e., harmless to the system and other users) and just get the root powers when it's really needed.

An example might help clarify. Assume you want to install a new service (daemon) on your machine; this is relatively new and you need to read about it and how to configure it to your needs. You will end up browsing the web a lot to find information, example configs, etc., maybe have some IRC chat to ask for more info -- none of this requires root powers! In the end, you only need privileged access for two operations:

  1. install the new program (i.e., sudo apt-get install ...), and
  2. edit the default configuration

A commonly accepted principle in computer security is always use the least possible privilege level to perform an operation. -- this reduces the risk that something bad happens because of bugs in the software or errors from the operator.

The Ubuntu default setup goes in this direction; if you were using a root login, instead, you would have ended up surfing the internet, doing IRC (and possibly all the other stuff that one does concurrently) from the root account, thus needlessly exposing the system to a threat.

1
  • Added link to original author at the top. Nov 1, 2018 at 13:17

Not the answer you're looking for? Browse other questions tagged .