How to add a new user with root permission using ssh

Step 1: login to ssh

login to your server by using ssh

Step 2: adding a new user

now type this command to add a new user
adduser yournewuser

Step 3: giving password to new user account

now type this command to add a new user
passwd newuserpassword

You are done with creating a new user as well as a password for your server. Now you have to assign permission to that user account.

Step 4: giving proper permission to the newly created user

now type this code
vsudo
It will open etc/sudoers.tmp file and allow you to edit the file. Beware of changes on this particular file. Change it very carefully.

Now search for the lines below
## Allow root to run any commands anywhere
root ALL=(ALL) ALL

just below the
root ALL=(ALL) ALL
add a new line
yournewuser ALL=(ALL) ALL

it means you are giving yournewuser same permission as root user.

now press [blog-button]ctrl+o[/blog-button], it will save the changes on the file and then press [blog-button]ctrl+x[/blog-button] to exit the file.

Congratulations, you successfully added a new user namely as yournewuser and he will have the same permission like a root user.