How to add a user to Debian and assign root rights?
Let’s start learning, how to add a user to Debian. In Debian, you will have to install sudo first, because it has not been installed by default.
apt install sudo
When you install Debian on your server, you will be assigned root access to that server. Root will have privileges to execute any command which can cause severe issues with your server in the worst case. Sometimes a command that has been executed accidentally can disrupt the working of the server. To avoid this, first of all, add a user account to limit access of commands. If you want to allow the user to execute administrator commands, you must add it to ‘wheel’ group.
adduser example_username sudo
The first command will install sudo, the second command will create a username and add password for this username and the third command will give administrative privileges.