& Lt; spanstyle = & quot; color: rgb (0, 0, 0); font-family: Tahoma, & 039; M
I haven't played LINUX for a long time. Today, my company's server is down, so I went in and checked it out. The bad thing is that I forgot the password of my company's server or LINUX. I am in trouble, what should we do? I studied it and found out how to find it one morning. The following describes how to find it in three ways:
Break = "style =" word-wrap: break-word; color: rgb (51, 51, 51); text-decoration: none; "target =" _ blank ">
Linux root password retrieval method 1
Step 1: When using grub to boot the system: when the grub screen appears, use the up/down key to select the one that you usually start linux (do not select dos), and then press the e key
Step 2: use the up and down keys again to select the one you usually start linux (similar to kernel/boot/vmlinuz-2.4.18-14 ro root = LABEL =/), and then press the e key
Step 2: modify the command line you see and add single. The result is as follows:
Kernel/boot/vmlinuz-2.4.18-14 single ro root = LABEL =/single
Step 2: press enter to return, and then press the B key to start, you can directly enter the linux command line.
Step 2: run the following command "vi/etc/shadow" to delete the contents of the first line, that is, the line starting with "root", "root", and "next, the first line is similar to root ::...... save
Vi/etc/shadow
Step 2: restart reboot. the root password is blank.
Linux root password retrieval method 2
Step 2: use passwd root to change the status of a single user.
Step 2: use the CD to boot the system and run linux rescue to connect the original/partition as follows:
Cd/mnt mkdir hd mount-t auto/dev/hdaX (original/partition ID) hd cd hd chroot./passwd root
Linux root password retrieval method 3
Step 2: use passwd root to change the status of a single user.
Step 2: use the CD to boot the system and run linux rescue to connect the original/partition as follows:
Cd/mnt mkdir hd mount-t auto/dev/hdaX (original/partition ID) hd cd hd chroot./passwd root
Step 2: Remove the local hard disk and mount it to other linux systems,