0

I was taking a look for questions, and I started to read this thread.

One of the answers says to use the command cat /etc/passwd|grep '/bin/bash', to test if there's other users in the computer. For security purposes, I tested that and I got this:

root:x:0:0:root:/root:/bin/bash
nori:x:1000:1000:Nori,,,:/home/nori:/bin/bash

Now, I would like to know, why there is a root user? I thought I only created 1 user.

Also, please note that after installing Ubuntu, my friends (who also use Linux, but not Ubuntu) told me to create a root password (which is different from the user password).

EDIT: To add the root password, I used the sudo -i, and then I used the passwd to create a new password.

Thank you for the help, and sorry if this question have already been answered.

Nori-chan
  • 845
  • The root user is always there, the root's password is not activated by default. I would suggest not to do that, you can do anything from the admin's user's account. – Jacob Vlijm Nov 07 '14 at 19:45
  • Well, my friends (one of them uses Manjaro and the other uses Debian) thought that was strange that Ubuntu doesn't asks for the root password, so they told me to create one (for security purposes) – Nori-chan Nov 07 '14 at 19:47
  • I would say the opposite, it is saver to choose your actions to run with sudo. – Jacob Vlijm Nov 07 '14 at 19:49
  • @JacobVlijm Sorry to ask that, but what do you mean with that? – Nori-chan Nov 07 '14 at 19:53
  • 1
    If I am in my "normal" user account, It is kind of difficult to really hurt the system. If I accidentally (try to) do harmfull things, the system asks me for my admin's password, making me aware. Running as root, I can easily mess up things, I am allowed to do anything without a warning. Also, when I might run malicious code without knowing it, it can do harm without a single fence if I run it as root. – Jacob Vlijm Nov 07 '14 at 19:58

2 Answers2

0

All linux systems have a root user; that is the user responsible for starting all kind of services.

In Debian based systems (like Ubuntu is) root itself disabled and we use a "sudo" system where a normal user gets elevated permissions by entering the admin password.

You can see the root prompt when you enter with your admin user:

sudo su

and the admin password for your user. Example:

rinzwind@schijfwereld:~$ sudo su
[sudo] password for rinzwind: 
root@schijfwereld:/home/rinzwind# 

Mind you: using it is discouraged; if you use it to access nautilus it is possible to break your system since some files depend on being owned by your user (and not root) and can be changed to root when changing the file.

Rinzwind
  • 299,756
  • Yeah, I discovered few days later after setting up the root password that I could do that. But, should I leave the root password, or remove it and access the root by using the admin password. And don't worry, I never use the root mode . – Nori-chan Nov 07 '14 at 19:51
  • @Nori-chan I would just leave it as it is, it does no harm. – Jacob Vlijm Nov 07 '14 at 19:53
  • Leave it as it is @Nori-chan Use your normal user for day to day tasks. And use sudo when you perform admin tasks. – Rinzwind Nov 07 '14 at 19:56
  • @JacobVlijm Good to know that. I will just leave like that. I thought I was being hacked D: (and only after 1 month of use).@Rinzwind I only use sudo to, for example, install updates by apt-get update or by installing a program. I never use the "sudo" mode, where I'm always sudo (I read that this can be dangerous). – Nori-chan Nov 07 '14 at 19:56
  • 1
    That's one task. When you use software that is outside your home (something like a server) then you will use it more. For day to day tasks (browsing, music, videos etc) you'll never need it :) – Rinzwind Nov 07 '14 at 20:00
0

Root is the superuser of your PC. Generally the user created during install is an administrator but doesn't have the privileges to run system level tasks. These admin users though have the permission to request the system altering commands from the Root using the sudo command.

Any other user doesnt even have the permission to request sudo permission from the root. Your user name should be part of sudoers file to be able to do so.

astrob0t
  • 1,746