A brief analysis of how to set the initial value of Linux root

A brief analysis of how to set the initial value of Linux root

Ubuntu does not allow root login by default, so the initial root account cannot be used. You need to use sudo permissions under a normal account to modify the root password.

Enter sudo passwd root in the terminal and press Enter. The system will then prompt you to enter the password of a normal user (the password entered in the terminal will not be displayed).

After entering, press Enter, and then enter the new root password twice to activate the root user.

First log in as a normal user and enter the following command>>>

~$ sudo passwd root
[sudo] passwd for you:****** (enter the user password, the password will not be displayed)
Enter new UNIX password:****** (set root password)
Retype new UNIX password: ****** (repeat password)

Then remind the success message.

Log in as root user >>>

~$ su root

passwd:***** (directly use the modified root password)

su switches to the root user by default and changes to the root user's environment. After entering, you can switch to the root user in the terminal to perform some operations.

Specific input process:

Summarize

The above is the method of setting the initial value of Linux root introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time!

You may also be interested in:
  • How to modify the root or other user password when you forget the password in the virtual machine Linux system
  • How to modify and reset the root password in Linux (super simple)
  • How to reset MySQL root password in Linux (CentOS)
  • How to set the initial root password in Linux
  • How to modify the root password of mysql under Linux
  • How to switch from a normal user to root without password in Linux
  • Solutions to forget mysql root password in Linux environment (three)

<<:  Detailed explanation of Vue Notepad example

>>:  Solution to MySQL garbled code problem under Linux

Recommend

A brief analysis of HTML space code

How much do you know about HTML? If you are learni...

12 Javascript table controls (DataGrid) are sorted out

When the DataSource property of a DataGrid control...

Detailed explanation of VUE Token's invalidation process

Table of contents Target Thought Analysis Code la...

Vue page monitoring user preview time function implementation code

A recent business involves such a requirement tha...

Have you really learned MySQL connection query?

1. Inner Join Query Overview Inner join is a very...

Implementation of CSS circular hollowing (coupon background image)

This article mainly introduces CSS circular hollo...

Problems and solutions for MYSQL5.7.17 connection failure under MAC

The problem that MYSQL5.7.17 cannot connect under...

Implementation steps for installing Redis container in Docker

Table of contents Install Redis on Docker 1. Find...

Some suggestions for improving Nginx performance

If your web application runs on only one machine,...

Oracle VM VirtualBox installation of CentOS7 operating system tutorial diagram

Table of contents Installation Steps Environment ...

MySQL changes the default engine and character set details

Table of contents 1. Database Engine 1.1 View dat...

Element Timeline implementation

Table of contents Components - Timeline Custom no...

Detailed process of installing logstash in Docker

Edit docker-compose.yml and add the following con...

How to solve the problem that Docker container has no vim command

Find the problem Today, when I tried to modify th...

Summary of English names of Chinese fonts

When using the font-family property in CSS to ref...