{"id":17215,"date":"2024-05-22T13:15:44","date_gmt":"2024-05-22T13:15:44","guid":{"rendered":"https:\/\/hostvento.com\/kb\/web-hosting\/learn-to-add-a-user-and-grant-root-privileges-on-ubuntu-18-04\/"},"modified":"2024-06-17T07:50:22","modified_gmt":"2024-06-17T07:50:22","slug":"learn-to-add-a-user-and-grant-root-privileges-on-ubuntu-18-04","status":"publish","type":"docs","link":"https:\/\/www.hostvento.com\/kb\/docs\/hosting-faqs\/learn-to-add-a-user-and-grant-root-privileges-on-ubuntu-18-04\/","title":{"rendered":"Learn To Add a User and Grant Root Privileges on Ubuntu 18.04"},"content":{"rendered":"\n<p>Adding a user and giving them root access is a simple procedure for a system administrator to complete. After the user is added and given root privileges, he will be able to access Ubuntu 18.04 and carry out crucial system maintenance tasks. Subsequently, the user can do elevated operations by using sudo before commands.<br>You will learn how to add a user and provide root permissions from this tutorial.<\/p>\n\n\n\n<p>Point to Remember :These instructions are specially used for adding a user on Ubuntu 18.04 LTS.<\/p>\n\n\n\n<p>Perform the following steps :<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Add Username<\/h2>\n\n\n\n<p>Using the adduser command, we will use Tom as our randomly chosen username in this example. You can enter your preferred username in place of Tom. The system will also inquire about my details from the user throughout this session. By just hitting enter, you can skip these details. Eventually, it will verify that the data is accurate, allowing us to add a new user.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/07\/adduser-min.png\" alt=\"adduser\" class=\"wp-image-6762\"\/><\/figure>\n\n\n\n<p><strong>Output :<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/07\/Output-min.png\" alt=\"Output\" class=\"wp-image-6763\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. Grant Root Privileges to the User<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/07\/visudo-min-300x17.png\" alt=\"visudo\" class=\"wp-image-6764\"\/><\/figure>\n\n\n\n<p>By entering the above command, we will be redirected to \/etc\/sudoers.tmp file, where we will be able to view the following code :<\/p>\n\n\n\n<p><a href=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/07\/User-specification-privilege-min.png\"><\/a><br>After the root user line, you will have to add a new user using the same format for us to grant admin privileges.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/07\/tom-all-min.png\" alt=\"tom all\" class=\"wp-image-6766\"\/><\/figure>\n\n\n\n<p>Once you have added the permission, save and exit the file using:&nbsp;<strong>wq<\/strong>&nbsp;and then enter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Verify that User Has Privileges<\/h2>\n\n\n\n<p>If all the instructions are followed correctly, then you will be able to run some commands like update, suing the sudo.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/07\/su-tom-min.png\" alt=\"su tom\" class=\"wp-image-6767\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/07\/sudo-apt-min.png\"><\/a><br>These are easy commands that you can perform.<\/p>\n\n\n\n<p><a href=\"https:\/\/hostvento.com\/kb\/web-hosting\/learn-to-use-curl-program\/\" target=\"_blank\" rel=\"noopener\"><strong>Learn to use cURL program<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding a user and giving them root access is a simple procedure for a system administrator to complete. After the user is added and given root privileges, he will be able to access Ubuntu 18.04 and carry out crucial system maintenance tasks. Subsequently, the user can do elevated operations by using sudo before commands.You will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":23377,"menu_order":635,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-17215","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/17215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/comments?post=17215"}],"version-history":[{"count":2,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/17215\/revisions"}],"predecessor-version":[{"id":20475,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/17215\/revisions\/20475"}],"up":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/23377"}],"wp:attachment":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/media?parent=17215"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/doc_tag?post=17215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}