-2

I just installed Ubuntu on my laptop and gave my name and a password for administrator account. Later in terminal I tried to create another user. It told me that only the root user can do it but i don't know to login as root and create a new user. In red hat i know how to, because I'm a red hat user. What should i do now someone please help me. i tried the codes

2  sudo apt-get install chromium-browser
3  mkusr general use
4  crusr general use
5  mkdir mukundan
6  adduser
7  exit
8  adduser
9  root
10  sudo apt install root-system-bin
11  --fix-missing?
12  run apt-get update
13  sudo apt install root-system-bin
14  mkdir
15  su root
16  su root 
17  su root
18  history

still nothing worked

Bruni
  • 10,542
  • did you try sudo su root ? – pLumo Jul 24 '17 at 13:37
  • 2
    The root account is already there as a part of your Ubuntu installation. You just need to set a password for it with sudo passwd root. However you don't need root to create a new user. To create a new user, when it asks for the password, just give it your own administrative password. And, please don't use commands if you don't know 100% what they do. You could damage your system. – heynnema Jul 24 '17 at 13:37

2 Answers2

4

The standard for Ubuntu is not to have an actual root user with its own password. This is done to minimize the risk of forgetting you're logged as root, and accidentally issuing a command that's harmless with user privileges, but will harm the whole system with root privilege.

The recognized alternative is sudo which generally allows a user account in the sudoers group to issue commands with root privilege. The password entry for sudo is remembered for a short time, but each following command requires typing sudo again, even if the password isn't reprompted.

This setup reduces overall system risk compared to having a root account, and doesn't block the admin user from doing anything that root could do.

Zeiss Ikon
  • 5,128
1

You don't need to create a root user it's already there. You can get temporary root permissions by running commands with sudo:

sudo adduser <new Username>

First you have to provide the password of your administration user.(the one you login with and which should be in the sudoers group) And follow the prompts (except the new users password you can let the most things empty)

if you want that new user also to have the ability of using sudo you do

sudo adduser <new Username> sudo

after the first command

derHugo
  • 3,356
  • 5
  • 31
  • 51
  • 1
    Why the downvote? my answer is addressing the OPs need: Later in terminal I tried to create another user. It told me that only the root user can do it but i don't know to login as root and create a new user. or not? – derHugo Jul 24 '17 at 14:53