In the Linux system, sometimes the root user accidentally deletes the root user because of the operation error, or does not understand the use of the root user. Can the deleted root user recover? In fact, it is ok, the following small series will introduce you to the Linux recovery method of the root user, let's learn together.
use the installation CD to boot the system, in case you want to start the installation, press ALT choose linux rescue
Rescue login # root
Check the hard disk partition
Rescue# fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 1 1024 1048560 82 Linux swap
/dev/sda2 1025 11264 10485760 83 Linux
Mounting partitions
Rescue# mount -n /-o remount,rw
Rescue# mount /dev/sda2 /mnt
Rescue# mount -o bind /dev /mnt/dev
Enter /etc/passwd to modify it. Add:
root:x:0:0:root:/root:/bin/bash
Set the root password after saving and restart the host to restore.
The above is the way Linux recovery was accidentally deleted by the root user. You need to use the installation CD to boot the system, mount the partition, and set the root password so that the root user can recover.
Unix system can uninstall the installed program through the command, but there are problems when the
Many users have used Docker to reflect the time when the Docker container is out of sync with the ho
As a Linux system administrator, in order to better manage the process, it is neces
In the operation of CentOS system, yum is not available when upgrading Python, and yum is a more imp
What should I do if the U disk file is read-only on Ubuntu and cannot be deleted?
RHEL6 changes the name of the asm disk by udev.
How to use LVM to manage partitions in Ubuntu system
Linux how to install and configure rz/sz command
Summary of methods for getting help from Linux
Linux how to use git to check out a separate branch
What should I do if the Linux system Git cannot exit completely (exit code 128 or 1)?
How to embed all LaTex fonts in PDF files under Linux
How to install virtualization tools in Linux llibvirt
Steps to install Fluentd on RedHat
LOL box skin can not be used? LOL box skin off the line solution!
Microsoft Windows 8 you have to know 10 points
Windows Server cluster technology (secret) technology revealed
How Win7 changes the MP3 music information
When the Win7 printer is cleared, it prompts not found dll files error processing
10 reasons why Microsoft should not extend the life of Win XP
Turn off the 10 practical methods of Windows 8 system
If the local connection is limited or no connection solution