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)
: