linux_ Hack password-rescue mode

Source: Internet
Author: User

Lab Machine: CentOS 5.7

  • Crack password
    • Setting up the boot screen
    • System Run Level
  • Rescue mode

First, crack the password

root user can change any user's password, the ordinary user can only modify their own password. steps:1. Reboot the system2, start the countdown time, knock any key3, according to the letter E to edit

4. Select the line beginning with kernel and press the letter E again to edit

Then tap the space to enter the number 1, then hit enter

Enter single-user mode to crack the password. (This mode bypasses password Authentication)

5, press the letter key B to boot into the system

6, directly passwd change the root user's password7. Enter init 5 or init 3 to enter the system, or reboot reboot the systemSupplemental Extensions:1, modify the configuration file---boot into the interface (character)
Shell> vim/etc/inittab# Default RunLevel. The runlevels used are:#0-Halt (Do notSetInitdefault to This)#   1-Single user mode#2-Multiuser, without NFS (the same as 3,ifYou DoNot having networking) #3-Full multiuser mode#4-unused#5-x11#6-Reboot (Do notSetInitdefault to This) Id:3: Initdefault://Set boot to enter character interface
Parsing: (Linux runlevel)
0Halt shut down the machine1Single-User mode--when I cracked the code,2Multi-user Mode--cannot use NFS feature3Full multi-user mode, you can use the network function--Character Interface4not used5Full multi-user mode, you can use the network function--Graphical Interface6Restart the default initialization level of the Initdefault system
init 0 shutdown (poweroff, Halt, Shutdown-h now)Init 6 Restart (reboot, Shutdown-r now)Init 3 enters the character interface 2. System operating level
shell> runlevel // view current runlevel 1  S     #1  represents the running level of the boot entry  #S Represents the current run level (single) shell3    Switch User level (restart ... ) Shell>3  #说明是从单用户切换到运行级别3 shell>3   N  means no previous run level

 Second, rescue modeQ: How to enter rescue mode (rescue modes)A:Use the disc to enter  steps:1, put into the system CD (does not matter whether the corresponding)2. Set boot from CDPress ESC When you enter the startup page (boot menu)> select Rescue installed system to enter rescue mode Follow the prompt steps (select)> Rescue Method--Local CD/DVD (Centos)> whether to connect the network--no> Want to make changes to the system (that is, it can be read and write)-Continue  read-only mode mount-read-only  If you want to activate San --and advanced  If there are errors you can skip this step into a shell -and-skip

> Chroot/mnt/sysimage #切换根环境到原来本身系统里的根

> cp/etc/passwd-/etc/passwd (or other operations to modify, VI file)

> Exit

> Reboot

 Summary:1. Single user mode--crack passwordSee/etc/passwdNo, look/etc/shadow .2. Rescue Mode--no access to the system.use the system on the CD to get into the computer and repair the system on the disk.

linux_ Hack password-rescue mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.