Create a Non-Root User with sudo Privileges
Add a Non-Root User
On Ubuntu / Debian based systems, creating a non-root user with sudo privileges is quite straight forward.
First, we'll create our non-root user with the command
adduser <username>
where you replace <username>
above with your actual name or username. In my case I would do
adduser brian
Enter a strong password for your user, then confirm the password. Enter the additional information if you like, though it's not required. Finally, accept the settings with 'Y'.
Add the user to the sudo group
To add our user to the sudo
group we'll use the command:
usermod -aG sudo <username>
Where, again, you'll replace <username>
with your name or username. In my case it would be
usermod -aG sudo brian
Now, you can log out and log back in as your new non-root user.
No Comments