Log in as root and execute:
# passwd username (change password) # useradd username (add user)
Specific examples are as follows:
[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 under linux
The root of linux enjoys the supreme power. Once the root password is forgotten or stolen, it is a very headache. So how can I get back the root password? I summarize it as follows:
(1) Linux system password cracking
1. Press e in the grub option menu to enter edit mode
2. Edit the kernel line /init 1 (or /single)
3. Press b to reboot
4. Execute the following command after entering
root@#passwd root (configure 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 edit mode
2. Edit the ro single on the kernel line and change it to rw single init=/bin/bash, press b to restart
3. Execute the following command after entering
root@(none)#mount -a root@(none)#passwd root root@(none)#reboot
(3) Freebsd system password cracking
1. Boot into the boot menu
2. Select each item (press 4) to enter single-user mode
3. Enter a list of commands after entering
root@#mount -a root@#fsck -y root@#passwd (modify password command)
What versions of Linux are there?
Linux versions include: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and other versions. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative distribution based on Ubuntu; Manjaro is a Linux distribution based on Arch; the default Cinnamon desktop of LinuxMint is similar to Windows XP and is easy to use; Ubuntu is a Linux operating system based on desktop applications.