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

4 principles for clean and beautiful web design

This article will discuss these 4 principles as t...

Linux system (Centos6.5 and above) installation jdk tutorial analysis

Article Structure 1. Preparation 2. Install Java ...

Detailed explanation of JavaScript's Set data structure

Table of contents 1. What is Set 2. Set Construct...

Introduction and examples of hidden fields in HTML

Basic syntax: <input type="hidden" na...

How to set a fixed IP address in CentOS7 virtual machine

Since my development environment is to install Ce...

React-Native environment setup and basic introduction

Environment Preparation 1. Environment Constructi...

Vue+Element UI realizes the encapsulation of drop-down menu

This article example shares the specific code of ...

37 Tips for a Good User Interface Design (with Pictures)

1. Try to use single column instead of multi-colum...

CSS solves the misalignment problem of inline-block

No more nonsense, post code HTML part <div cla...

MySql grouping and randomly getting one piece of data from each group

Idea: Just sort randomly first and then group. 1....

How to configure MGR single master and multiple slaves in MySQL 8.0.15

1. Introduction MySQL Group Replication (MGR for ...

Analysis of the process of building a LAN server based on http.server

I don’t know if you have ever encountered such a ...

Vue implements simple comment function

This article shares the specific code of Vue to i...