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.

H2ONaCl
  • 10,039

3 Answers3

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".

Rinzwind
  • 309,379
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.

Rinzwind
  • 309,379
Anirudh
  • 176
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.