Modify the root password method under Linux
Log in as root, execute:
passwd User Name
Then follow the prompts, enter a new password, enter the new password again, the system will prompt to successfully change the password.
Specific examples are as follows:
[Email protected] ~]# passwd rootchanging password for user root. New UNIX Password:bad Password:it is based on a dictionary wordretype new UNIX Password:passwd:all authentication tokens Updated successfully.
Commands to add new users under Linux
Useradd User Name
Root password retrieval method under Linux
Linux Root has the supremacy of power, once the root password is forgotten or stolen, is a very headache, then how to retrieve the root password? I would like to summarize it as follows:
(a) Linux system password cracking
- Press E to enter edit mode on the GRUB Options menu
- Edit kernel that line/init 1 (or/single)
- Press B to restart
- After entering, execute the following command
[Email protected] #passwd root (config root password)
Enter new UNIX password: Enter the password
[Email protected] #init 6
(ii) Debian Linux system password cracking
- In the Grub Options menu ' Debian gnu/linux,... (recovery mode) ', press E to enter edit mode
- Edit kernel that row of RO single to RW single init=/bin/bash, press B to perform the restart
- After entering, execute the following command
[Email protected] (none) #mount-a[email protected] (none) #passwd Root[email protected] (none) #reboot
(iii) FreeBSD system password cracking
- Booting into the boot menu
- Select each entry (press 4) to enter single user mode
- Enter a list of commands after entering
[Email protected] #mount-a[email protected] #fsck-y[email protected] #passwd (Change password command) [email protected] #root (username to crack password) Enter new UNIX Password:[email protected] #init 6 (restart)
(iv) Solaris system password cracking bitscn.com
- Select the Solaris FAILASFE entry in the Grub Options menu
- The system prompts do you wish to have it mounted read-write on/a? [Y,n,?] Select Y
- into single-user mode
- Enter the following command
#passwd #new passwd: Enter a new password #re-enter passwd: Enter a new password at the time #init 6 (restart) bitscn.com
(v) NETBSD system password hack
1. Power on: When the prompt sign appears and start the countdown for five seconds, type the following command:
> boot-s (enter single-user mode command)
2. In the following hint symbol
Enter pathname of shell or RETURN for SH:
Press Enter.
3. Type the following command:
# mount-a# Fsck-y
4. Use passwd to change the root password.
5. Use the Exit command to enter multi-person mode.
(vi) Debian Linux system password cracking
- On the Grub boot loader menu, select the entry you want to enter, and type "E" to enter the edit mode;
- In the second line (similar to kernel/vmlinuz-2.6.15 ro root=/dev/hda2), type "E" into edit mode;
- At the end of the sentence add "Init=/bin/bash", enter;
- Press "B" to start the system.
So we can get a bash shell, after entering the shell, the mount mode of the root partition is read-only, we want to change it to writable, otherwise we cannot alter the root password:
Mount-no remount,rw/passwd rootsyncmount-no Remount,ro/reboot
This will successfully change the Debian root user's password.
Seven
1. When booting Linux, press CTRL X, enter Linux single or Linux 1 at the bash# prompt, and then enter passwd root in bash# to change the password! #init 6 restart OK after Setup.
2. When booting Linux, press CTRL x, enter at bash# prompt: vi etcpasswd, find root, put the "X" inside the root:x: .... Delete the password!
(eight)
First, about Lilo
- When you see the Lilo: prompt, type Linux single screen display Lilo:linux single
- Enter directly into the Linux command line
- Change the password with the password command
Ii. about GRUB
- When the Grub screen appears, use the up and down keys to select the one you normally start Linux on, and then press the E key
- Use the up and down keys again to select the one you normally start Linux (similar to kernel/boot/vmlinuz-2.4.18-14 ro root=label=/), and then press the E key
- To modify the command line you see now, add single and the result is as follows: kernel/boot/vmlinuz-2.4.18-14 single ro root=label=/single
- Enter the Linux command line by returning the carriage return and then pressing the B key to start
- Change the password with the password command
Nine
- Insert the system installation CD, restart the machine, start quickly press the DEL key, into the CMOS, the boot sequence to CD-ROM first start, so that the Linux installer started, press F5, follow the prompts to enter Linuxrescue Enter the rescue mode, followed by the choice of language and keyboard, Enter directly, the program tip has installed the Linux system on the hard disk/mnt/sysimage, and then there is a super user prompt #.
- Go to the hard disk etc directory: CD/MNT/SYSIMAGE/ETC, first backup to prevent accidents: Cpshadowshadow.old Modify the properties of the shadow file is writable: chmod Wshadow then use VI to modify: Find the line containing the root user information: root: ....:, the first two colon is an encrypted password, delete it (colon can not be deleted), save the log out. The root password is empty.
- Users who do not use VI can take the following approach: Find a DOS disk into the floppy drive, copy the shadow to the DOS disk: mcopyshadowa:/and then modify it with the Notepad in the attachment under Windows, note that opening the file type must select All Files (*. *), Save to exit. Copy back: mcopya:/shadowmnt/sysimage/etc
- Change the properties of the shadow back to read-only: Chmod-wshadow, enter exit to exit and remove the disc. For security reasons, you should re-add the root in the terminal window after rebooting.
How to change the root password and retrieve root password under Linux