0

My cloud servers on Ubuntu 14.04 have a user named root.

Locally (not on the cloud), when I use System Settings > User Accounts there is no user named root and when I attempt to add one it does not allow it. Why not and how can I get a user named root?

I want to make my local experiments as similar as possible to the cloud servers. That's my purpose for a user named root.

1
  • pretty sure this is just a naming convention thing. root refers to the being at the root (i.e. the / directory ) of the system, it also can refer to 'root priviledges' where you are a super user. So I think you're an administrator on your cloud server and it's just given you the default name while on your home installations it's a protected name. I think if you run your program as super user (SU) or pre-fixed with sudo it should be the same. That being said I'd wait for someone who knows more :P
    – m4p85r
    Mar 2, 2016 at 6:51

3 Answers 3

1

Run the following command and check the output

cat /etc/passwd | grep root

It should show something like that

root:x:0:0:root:/root:/bin/bash

Normally you don't have access to the root account and your default account has sudo privileges.

2
  • That line exists in /etc/password so I guess the GUI tool to add users just doesn't show it. I will need to add a password for user 'root' since it's not the same as my sudo password.
    – H2ONaCl
    Mar 2, 2016 at 8:13
  • Read this question post askubuntu.com/questions/9017/… . But if you have a sudo user why do you need root .
    – Anirudh
    Mar 2, 2016 at 9:28
1

Don't know anything about Ubuntu Cloud, but all Ubuntu installations have a root user (all GNU/Linux distros do), but most versions of Ubuntu hide it, and require the user to use Sudo for administrative tasks instead. To answer your question, you cannot create the user root, because the user already exists.

Don't believe me, type:

sudo -u root whoami

The result should be "root".

0

The account root is already there, as other have pointed out. It's a very special one, not your typical user account, so it's usually hidden from most graphical tools out there.

You're not supposed to use that account directly, but through sudo only when neccessary. By default, the login with that account is disabled, and it should stay that way for most people.

If you know what you're doing, You can still enable that account with this command:

sudo passwd

That will let you assign a password to root and enable its login. This has an only advantage for typical installations AFAIK: automatically enable password-protected recovery mode, otherwise completely unprotected.

Even when enabled, the root account will still be hidden from most graphical tools. Some can be configured to show it, some don't.

2
  • I think sudo passwd changes my password. I need to set 'root's password.
    – H2ONaCl
    Mar 2, 2016 at 8:19
  • Nope, that's not the case because with sudo you are running passwd as root. I've just checked it. Anyway, putting "root" at the end will do no harm, so that's ok too: sudo passwd root Mar 2, 2016 at 15:43

You must log in to answer this question.

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