> Source: https://www.vultr.com/docs/create-a-sudo-user-on-ubuntu-best-practices ### Introduction Performing server administration as a non-root user is a best practice for security. After launching your Vultr VPS, your first task as root should be to set up a non-root user with sudo access. This guide applies to the following versions: - Ubuntu 20.04 LTS - Ubuntu 19.10 - Ubuntu 18.04 LTS - Ubuntu 16.04 LTS ### 1. Add a New User Account Create a new user account with the `adduser` command. Use a strong password for the new user. You can enter values for the user information, or press `ENTER` to leave those fields blank. ```sh # adduser example_user ``` ### 2. Add the User to the Sudo Group Add the new user to the sudo group with usermod. ```sh # usermod -aG sudo example_user ``` ### 3. Test Switch to the new user. ```sh # su - example_user ``` Verify you are the new user with whoami, then test sudo access with sudo whoami, which should return root. ```sh $ whoami example_user $ sudo whoami [sudo] password for example_user: root ```