I want to write linux related articles for a long time. As a pseudo-technical origin of operation and maintenance, I think linux is the future trend, so the first step of linux password security is very important. To illustrate, the platform Red Hat Linux (2.4.20-8).
Crack the login password
GRUB: On the boot loader menu, type [e] to enter edit mode. You will be faced with a list of boot projects. Look for a line that resembles the following output: kernel /vmlinuz-2.4.18-0.4 ro root=/dev/hda2 Press the arrow keys until the line is highlighted, then press [e]. You can now tell GRUB to boot single-user Linux mode by adding a single at the end of the text. Press [Enter] to make the edits take effect. You will be taken to edit the mode screen, from here, pressing GRUB will boot the single-user Linux mode. After the end of the load, you will face a shell prompt similar to the following: sh-2.05# Now you can change the root command, type: bash# passwd root You will be asked to retype the password to verify. At the end, the password will be changed, you can type reboot at the prompt to reboot; then, log in as the root user as usual. LIL When the system boots to the LILO boot screen, press TAB to enter the text mode for the graphical boot mode, then enter linux single at LILO to enter the password-free console. After entering the password, use the passwd command to change the root password. can.
Method 2: grub->linux->Select one---E---> Enter at the prompt (/linux s init 1)--Enter--b- -> After rebooting, enter (vi /etc/passwd and remove the user's password transfer bit (x) from the prompt, forcibly save)----restart!
This is the most common and quickest way
Prevent others from changing passwords in single-user mode.
Since you want to guide single-user mode, you need to edit it in grub. Therefore, we only need to encrypt grub, and you can prevent it from being modified by others.
The method is as follows:
1, grub has a configuration file, in the /etc folder. The name is “grub.conf”, find this file, edit with vi.
2, we look at the contents of the file: (comment is free)
default=0
timeout=10
splashimage=(hd0 ,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz- 2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
The specific meaning you can check the relevant documentation of grub, here we want to add password.
There are two places where you can add a password.
3, the first is "under the timeout = 1 /rdquo; below, here plus "password=123456" (123456 is their own password). Save, exit, restart. We can see that it is no longer possible to modify it on the grub interface by “e”. If you want to modify it, you must press “ld”;p” to enter the password and modify it.
4, the second is under the "initrd /initrd-2.4.20-8.img" rdquo; Add "ldword;password=123456”" (123456 is your own password). Save, exit, restart. We can see that there is another password before linux is started (over the grub interface). It is worth noting that this password can be prevented from entering in single-user mode. In other words, even if we start single-user mode by editing grub, we still have to enter this password.
How to crack the grub password and get the user right
To get the grub password, we have to find a way to read the grub.conf file. But there is no grub password, no root password. . . So we can't boot through grub.
The method is as follows:
1. First, you need to modify the startup mode of this virtual machine. We need to boot from the CD. The virtual machine defaults to the hard disk as the first boot mode.
When the virtual machine is just started (the big "vmware" interface), press "ld2;" to enter bios.
2. Select the boot column. Select “CD-ROM Drive” one, press “+”“CD-ROM Drive” to the top. In this way, the system will start the default boot mode by default.
3, after the first installation disk image of linux is bound to the CD-ROM drive, save and restart. The system will directly enter the linux installation interface. At the prompt, type “linux rescue” Enter, the system will start the Linux rescue mode.
4, there will be several options on the way, follow the prompts to choose. Finally, I will see a description, presumably that the rescue system has mounted the original system file (the one on the hard disk) to the folder "/mnt/sysimage".
5, after starting, we can look for the grub.conf file. Here we should pay attention to the structure of the folder: we are now in the root directory of the rescue system. And we are looking for the original system “ /etc /grub.conf & rdquo;, so the complete path is: "/mnt /sysimage /etc /grub.conf & rdquo;. Edit this file with vi, we can see and modify the file. This cracks the grub password.
Prevent others from booting into linux rescue mode.
We can see that bios must be modified to boot into rescue mode. Then we can encrypt the bios to prevent others from modifying the bios, so that it cannot be booted from the CD.
The method is as follows:
This is relatively simple. After entering bios, select the “Security” item. Enter on “Set Supervisor Password”. Set the password on it. such. We need a password when we restart the system and enter bios again.
How to crack the bios password
What methods do we often use when clearing the host bios password? Pull the jumper, pick up the battery, and let the bios be restored to factory settings. So, is there a similar approach on virtual machines?
Here's how:
Find the folder where the virtual machine is located. There should be a file with the suffix "“.nvram". Delete this file. Start the system. We can see that. The bios was reset.
using direct-lvm storage method Recently played docker on Bluemix virtual machine, but found that t
First find the iptables file Generally under /etc/sysconfig Then vi iptables Just like add
Use yum to install the scheduled task function. The result is prompted:
Copy the code
The code is as follows:
# yum -y install vixie-cron
Loaded plugins: fastestmirror, refresh-pa
Grep yum root 6744 0.0 0.0 103260 900 pts/1 S+ 14:59 0:00 grep yum root 25960 0.0 0.0 0 0 ? Z Sep19
Alibaba Cloud host has been a very good choice for domestic small webmasters, not only mature techno
Linux kernel 3.14.5 latest release
Character encoding and conversion tool for files under GnuLinux
Explain the find and locate commands for finding directories and files in Linux
The small knowledge points used in the Linux system accumulate
Linux tutorial - view the process ps, top
Compile USB wireless network card driver based on rtl8188cu control chip under linux
How to make Linux run on U disk
Summary of Techniques for Copying Files Between Linux Systems
LINUX Common Commands Encyclopedia
Get CPU information under Linux
Four shifting engines for the Googles BBR TCP congestion control algorithm
Solve Windows 7 does not recognize part of the DVD drive
Win8 system create /delete /format partition
What brand of general computer graphics card is good
How to display greetings when using the win7 computer's taskbar?
Win10 desktop empty line at the bottom how to do
Win7 system sharing wifi prompt error 1203 how to do
How does Win8 view the system version number?
Linux centos shutdown and restart command detailed and actual
Killing the original PC version of the plot of the seventh level of the task Raiders detailed