How to change the root password and retrieve the password in Linux
Log in as root and execute:
# Passwd user name (change password)
# Useradd user name (add user)
Example: [root @ bogon ~] # Passwd root
Changing password for user root.
New UNIX password:
Bad password: it is based on a dictionary word
Retype new UNIX password:
Passwd: all authentication tokens updated successfully.
How to retrieve the root password in linux
========================================================== ==========================================
Linux root has the highest power. Once the root password is forgotten or stolen, it is a headache. how can I retrieve the root password? I will summarize it as follows:
(1) Linux system password cracking
1. press e in the grub option menu to enter the editing mode.
2. edit the line/init 1 (or/single) of the kernel)
3. Press B to restart
4. run the following command
Root @ # passwd root (configure the root password)
Enter new unix password: Enter a new password
Root @ # init 6
========================================================== ==========================================
(2) debian linux system password cracking
1. in the grub option menu 'debian GNU/Linux,... (recovery mode) ', press e to enter the editing mode.
2. edit the ro single line in the kernel to rw single init =/bin/bash, and press B to restart.
3. run the following command
Root @ (none) # mount-
Root @ (none) # passwd root
Root @ (none) # reboot
========================================================== ==========================================
(3) Freebsd system password cracking
1. boot to enter the boot menu
2. select each item (press 4) to enter the single-user mode.
3. enter a command column.
Root @ # mount-
Root @ # fsck-y
Root @ # passwd (password change command)
Original text from [than the internet], reproduced please retain the original link: http://soft.chinabyte.com/ OS /232/12082732.shtml