{"id":880,"date":"2018-11-21T20:59:23","date_gmt":"2018-11-21T20:59:23","guid":{"rendered":"https:\/\/draculaservers.com\/tutorials\/?p=880"},"modified":"2021-11-14T22:55:55","modified_gmt":"2021-11-14T22:55:55","slug":"create-sudo-user-ubuntu","status":"publish","type":"post","link":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/","title":{"rendered":"How to Create a Sudo User on Ubuntu"},"content":{"rendered":"<p>In this tutorial we&#8217;ll create a <code>sudo<\/code> user on Ubuntu 18.04. The <code>sudo<\/code> command makes it possible for normal users to execute commands using administrator privileges, such as <code>root<\/code>.<\/p>\n<p>You&#8217;ll often find that it&#8217;s recommended that you act as a sudo user, rather than root, when making changes to your system, as it&#8217;s more secure.<\/p>\n<blockquote class=\"note\"><p><small>A few of the main reasons to use a sudo user instead of root are:<\/small><\/p>\n<ul class=\"note-ul\">\n<li>1. It prompts you for the password before major changes can happen. This helps as it can make you think of the consequences of what you&#8217;re doing.<\/li>\n<li>2. sudo adds a log entry of the command(s) run <code>(in \/var\/log\/auth.log)<\/code>. You can check what commands were run, should something go wrong.<\/li>\n<li>3. <code>root<\/code> is a default user on every server. Hackers know this and will attempt brute-force attacks on your server with the username <code>root<\/code>. They don&#8217;t know the usernames of your other users, however.<\/li>\n<li>4. You don&#8217;t have to share your <code>root<\/code> account with someone that needs to do administrative tasks on your machine.<\/li>\n<li>5. Authentication expires after a short time ( this can me edited ), so if you leave the terminal open, it won&#8217;t stay open indefinitely.<\/li>\n<\/ul>\n<p><small>If you&#8217;d like to check all advantages and disadvantages of using a sudo user, instead of root, then you can find them on the <a href=\"https:\/\/help.ubuntu.com\/community\/RootSudo#Benefits_of_using_sudo\" target=\"_blank\" rel=\"noopener\">Ubuntu community wiki page<\/a>.<br \/>\n<\/small><\/p><\/blockquote>\n\n<h2 id=\"steps-to-creating-a-sudo-user\">Steps to Creating a Sudo User<\/h2>\n<h5 id=\"1-log-into-your-server-via-ssh\">1. Log into your server via SSH<\/h5>\n<p>Log into your server as the <code>root<\/code> user.<\/p>\n<blockquote class=\"note\"><p><small>If you are new to Linux, then follow this <a href=\"https:\/\/draculaservers.com\/tutorials\/connect-vps-via-ssh-using-putty\/\" target=\"_blank\" rel=\"noopener\">tutorial to connect to your server via SSH<\/a><\/small><\/p><\/blockquote>\n<h5 id=\"2-add-a-new-user-to-ubuntu\">2. Add a New User to Ubuntu<\/h5>\n<p>To add a new user, run the following command, replacing <code>newuser<\/code> with your desired user:<\/p>\n<pre><code>$ adduser newuser<\/code><\/pre>\n<blockquote class=\"note\"><p><small>The username you create should be in lowercase letters and with no special characters. If the user you create does not fit the criteria, then you&#8217;ll receive the following error:<\/small><\/p>\n<pre><code>adduser: Please enter a username matching the regular expression configured\nvia the NAME_REGEX[_SYSTEM] configuration variable.  Use the `--force-badname'\noption to relax this check or reconfigure NAME_REGEX.<\/code><\/pre>\n<\/blockquote>\n<p>In my case, I&#8217;ll name my user <code>vlad<\/code>.<\/p>\n<p>Once you run the command, you should see something like the following output:<\/p>\n<p><small>Output<\/small><br \/>\n<div class=\"showyourterms regular nostatusbar\" data-title=\"root@draculaservers\">\n<div class=\"line green\" data-delay=\"10\" data-speed=\"50\">root@dracula:~#&nbsp;adduser&nbsp;vlad<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">Adding&nbsp;user&nbsp;vlad'&nbsp;...<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">Adding&nbsp;new&nbsp;group&nbsp;vlad&#8217;&nbsp;(1001)&nbsp;&#8230;<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">Adding&nbsp;new&nbsp;user&nbsp;vlad'&nbsp;(1001)&nbsp;with&nbsp;group&nbsp;vlad&#8217;&nbsp;&#8230;<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">Creating&nbsp;home&nbsp;directory&nbsp;\/home\/vlad'&nbsp;...<\/div><div class=\"line\" data-delay=\"10000\" data-speed=\"50\">Copying&nbsp;files&nbsp;from&nbsp;\/etc\/skel&#8217;&nbsp;&#8230;<\/div>   <\/div><\/p>\n<p>You will be prompted to enter a password you&#8217;d like to assign your new user. Please make sure that the password is a strong as possible.<\/p>\n<pre><code>New password:\nRetype new password:\npasswd: password updated successfully<\/code><\/pre>\n<p>After you&#8217;ve set your password, the command will create a home directory for the user, copy configuration files in the home folder and prompt you for your new user&#8217;s information. You can leave everything blank, and press <code>Enter<\/code> for each one to accept the defaults:<\/p>\n<pre><code>Changing the user information for vlad                                          \nEnter the new value, or press ENTER for the default                             \n        Full Name []:                                                           \n        Room Number []:                                                         \n        Work Phone []:                                                          \n        Home Phone []:                                                          \n        Other []:                                                               \nIs the information correct? [Y\/n] y<\/code><\/pre>\n<p>Once you&#8217;ve confirmed that the information you entered is correct, your user has been created and ready for use.<\/p>\n<h5 id=\"3-add-the-new-user-to-the-sudo-group\">3. Add the New User to the Sudo Group<\/h5>\n<p>Now we&#8217;ll add our newly created user to the <code>sudo<\/code> group, thereby allowing it to execute commands with administrator privileges. To do this, run the following command, replacing <code>vlad<\/code> with the user you created:<\/p>\n<pre><code>$ usermod -aG sudo vlad<\/code><\/pre>\n<h5 id=\"4-login-as-the-new-sudo-user\">4. Login as the New Sudo User<\/h5>\n<p>Our new <code>sudo<\/code> user is all set up. Now all we have to do is switch to the new user account. We do this using the <code>su<\/code> command, as follows:<\/p>\n<pre><code>su - vlad<\/code><\/pre>\n<p>You may notice that once executed the command, your prompt will change and indicate that you are logged in as the new user, and not <code>root<\/code>.<\/p>\n<div class=\"showyourterms regular nostatusbar\" data-title=\"root@draculaservers\">\n<div class=\"line green\" data-delay=\"10\" data-speed=\"50\">root@dracula:~#&nbsp;su&nbsp;\u2013&nbsp;vlad<\/div><div class=\"line\" data-delay=\"10000\" data-speed=\"50\">vlad@dracula:~$<\/div>   <\/div>\n<h2 id=\"test-the-sudo-user\">Test the Sudo User<\/h2>\n<p>Let&#8217;s make sure the sudo user is set up correctly and test if it has <code>sudo<\/code> access. If you haven&#8217;t switched to it, do so now, replacing <code>vlad<\/code> with your created username:<\/p>\n<pre><code>su - vlad<\/code><\/pre>\n<p>Use <code>sudo<\/code> to run the <code>whoami<\/code> command. The first time you use <code>sudo<\/code> in a session, you&#8217;ll be prompted to enter the user password.<\/p>\n<div class=\"showyourterms regular nostatusbar\" data-title=\"root@draculaservers\">\n<div class=\"line green\" data-delay=\"10\" data-speed=\"50\">vlad@dracula:~$&nbsp;sudo&nbsp;whoami<\/div><div class=\"line red\" data-delay=\"10\" data-speed=\"50\">[sudo]&nbsp;password&nbsp;for&nbsp;vlad:<\/div><div class=\"line\" data-delay=\"10000\" data-speed=\"50\">root<\/div>   <\/div>\n<p>If your user has <code>sudo<\/code> access, then the output of the <code>whoami<\/code> command should be <code>root<\/code>.<\/p>\n<h2 id=\"how-to-use-sudo\">How to Use sudo<\/h2>\n<p>To use <code>sudo<\/code> with your new user, just prefix any command you&#8217;d normally run with <code>sudo<\/code> and a space.<\/p>\n<p>Let&#8217;s try it out by listing the contents of the <code>\/root<\/code> directory, which is normally only accessible by the <code>root<\/code> user. To do this run:<\/p>\n<pre><code>$ sudo ls -la \/root<\/code><\/pre>\n<div class=\"showyourterms regular nostatusbar\" data-title=\"root@draculaservers\">\n<div class=\"line green\" data-delay=\"10\" data-speed=\"50\">vlad@dracula:~$&nbsp;sudo&nbsp;ls&nbsp;-la&nbsp;\/root<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">total&nbsp;40<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">drwx------&nbsp;5&nbsp;root&nbsp;root&nbsp;4096&nbsp;Nov&nbsp;15&nbsp;14:45&nbsp;.<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">drwxr-xr-x&nbsp;22&nbsp;root&nbsp;root&nbsp;4096&nbsp;Nov&nbsp;15&nbsp;12:16&nbsp;..<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">drwxr-xr-x&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;Nov&nbsp;15&nbsp;12:09&nbsp;.asciinema<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">-rw-------&nbsp;1&nbsp;root&nbsp;root&nbsp;1568&nbsp;Nov&nbsp;20&nbsp;14:39&nbsp;.bash_history<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">-rw-r--r--&nbsp;1&nbsp;root&nbsp;root&nbsp;3106&nbsp;Apr&nbsp;9&nbsp;2018&nbsp;.bashrc<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">drwx------&nbsp;2&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;30&nbsp;00:53&nbsp;.cache<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">drwxr-xr-x&nbsp;3&nbsp;root&nbsp;root&nbsp;4096&nbsp;May&nbsp;30&nbsp;00:55&nbsp;.local<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">-rw-------&nbsp;1&nbsp;root&nbsp;root&nbsp;19&nbsp;Nov&nbsp;15&nbsp;14:45&nbsp;.mysql_history<\/div><div class=\"line\" data-delay=\"10\" data-speed=\"50\">-rw-r--r--&nbsp;1&nbsp;root&nbsp;root&nbsp;148&nbsp;Aug&nbsp;17&nbsp;2015&nbsp;.profile<\/div><div class=\"line\" data-delay=\"10000\" data-speed=\"50\">-rw-r--r--&nbsp;1&nbsp;root&nbsp;root&nbsp;169&nbsp;Nov&nbsp;13&nbsp;13:23&nbsp;.wget-hsts<\/div>   <\/div>\n<p>But what if we don&#8217;t use <code>sudo<\/code>? Let&#8217;s try this by running the command again without the use of <code>sudo<\/code>:<\/p>\n<pre><code>$ ls -la \/root<\/code><\/pre>\n<div class=\"showyourterms regular nostatusbar\" data-title=\"root@draculaservers\">\n<div class=\"line green\" data-delay=\"10\" data-speed=\"50\">vlad@dracula:~$&nbsp;ls&nbsp;-la&nbsp;\/root<\/div><div class=\"line\" data-delay=\"10000\" data-speed=\"50\">ls:&nbsp;cannot&nbsp;open&nbsp;directory&nbsp;&#8216;\/root&#8217;:&nbsp;Permission&nbsp;denied<\/div>   <\/div>\n<p>As mentioned before, only users with <code>root<\/code> privileges can access the <code>\/root<\/code> directory, so we are denied accessing it this time.<\/p>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>Well done. You&#8217;ve learned how to create and use a new user with <code>root<\/code> privileges, which is an important and often overlooked step in securing your server.<\/p>\n<p>If you&#8217;ve had any issues with this tutorial, then don&#8217;t hesitate to contact us or leave a comment below, and we&#8217;ll try to get back to you as soon as possible.<\/p>\n<p>If you&#8217;re looking for high-performance servers at entry-level prices, then be sure to check out our <a href=\"https:\/\/draculaservers.com\/kvm.php\">KVM Linux Plans<\/a>. Our offer starts at just $5.99\/mo for 2GB RAM &amp; 10GB SSD Linux VPS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we&#8217;ll create a sudo user on Ubuntu 18.04. The sudo command makes it possible for normal users to execute commands using administrator privileges, such as root. You&#8217;ll often find that it&#8217;s recommended that you act as a sudo user, rather than root, when making changes to your system, as it&#8217;s more secure. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":918,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[42,43,44],"class_list":["post-880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-getting-started","category-linux-basics","tag-apache","tag-phpmyadmin","tag-ubuntu-18-04"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"featured_image_urls_v2":{"full":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png",1024,512,false],"thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu-150x150.png",150,150,true],"medium":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu-300x150.png",300,150,true],"medium_large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu-768x384.png",768,384,true],"large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png",1024,512,false],"1536x1536":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png",1024,512,false],"2048x2048":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png",1024,512,false],"pk-small":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu-80x80.png",80,80,true],"pk-thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu-300x225.png",300,225,true]},"post_excerpt_stackable_v2":"<p>In this tutorial we&#8217;ll create a sudo user on Ubuntu 18.04. The sudo command makes it possible for normal users to execute commands using administrator privileges, such as root. You&#8217;ll often find that it&#8217;s recommended that you act as a sudo user, rather than root, when making changes to your system, as it&#8217;s more secure. A few of the main reasons to use a sudo user instead of root are: 1. It prompts you for the password before major changes can happen. This helps as it can make you think of the consequences of what you&#8217;re doing. 2. sudo adds&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/draculaservers.com\/tutorials\/category\/getting-started\/\" rel=\"category tag\">Getting Started<\/a>, <a href=\"https:\/\/draculaservers.com\/tutorials\/category\/linux-basics\/\" rel=\"category tag\">Linux Basics<\/a>","author_info_v2":{"name":"Vlad","url":"https:\/\/draculaservers.com\/tutorials\/author\/vlad\/"},"comments_num_v2":"0 comments","yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create a Sudo User on Ubuntu - Dracula Servers Tutorials<\/title>\n<meta name=\"description\" content=\"Step by step tutorial on how to create and use a new sudo user on Ubuntu. With a sudo user you&#039;ll safely execute commands with administratove privileges.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Sudo User on Ubuntu - Dracula Servers Tutorials\" \/>\n<meta property=\"og:description\" content=\"Step by step tutorial on how to create and use a new sudo user on Ubuntu. With a sudo user you&#039;ll safely execute commands with administratove privileges.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Dracula Servers Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-21T20:59:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-14T22:55:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vlad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vlad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/\"},\"author\":{\"name\":\"Vlad\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/931f7fa8b2126ace6edfb82775e0ec0e\"},\"headline\":\"How to Create a Sudo User on Ubuntu\",\"datePublished\":\"2018-11-21T20:59:23+00:00\",\"dateModified\":\"2021-11-14T22:55:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/\"},\"wordCount\":881,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/How-to-create-a-sudo-user-on-ubuntu.png\",\"keywords\":[\"Apache\",\"phpMyAdmin\",\"Ubuntu 18.04\"],\"articleSection\":[\"Getting Started\",\"Linux Basics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/\",\"name\":\"How to Create a Sudo User on Ubuntu - Dracula Servers Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/How-to-create-a-sudo-user-on-ubuntu.png\",\"datePublished\":\"2018-11-21T20:59:23+00:00\",\"dateModified\":\"2021-11-14T22:55:55+00:00\",\"description\":\"Step by step tutorial on how to create and use a new sudo user on Ubuntu. With a sudo user you'll safely execute commands with administratove privileges.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#primaryimage\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/How-to-create-a-sudo-user-on-ubuntu.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/How-to-create-a-sudo-user-on-ubuntu.png\",\"width\":1024,\"height\":512,\"caption\":\"sudo_user_ubuntu_featured_image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/create-sudo-user-ubuntu\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Sudo User on Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"name\":\"Dracula Servers Tutorials\",\"description\":\"Dedicated Servers\",\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\",\"name\":\"Dracula Servers\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"width\":1625,\"height\":200,\"caption\":\"Dracula Servers\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/931f7fa8b2126ace6edfb82775e0ec0e\",\"name\":\"Vlad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g\",\"caption\":\"Vlad\"},\"description\":\"Tech Support\",\"sameAs\":[\"https:\\\/\\\/draculaservers.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a Sudo User on Ubuntu - Dracula Servers Tutorials","description":"Step by step tutorial on how to create and use a new sudo user on Ubuntu. With a sudo user you'll safely execute commands with administratove privileges.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Sudo User on Ubuntu - Dracula Servers Tutorials","og_description":"Step by step tutorial on how to create and use a new sudo user on Ubuntu. With a sudo user you'll safely execute commands with administratove privileges.","og_url":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/","og_site_name":"Dracula Servers Tutorials","article_published_time":"2018-11-21T20:59:23+00:00","article_modified_time":"2021-11-14T22:55:55+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png","type":"image\/png"}],"author":"Vlad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vlad","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#article","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/"},"author":{"name":"Vlad","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/931f7fa8b2126ace6edfb82775e0ec0e"},"headline":"How to Create a Sudo User on Ubuntu","datePublished":"2018-11-21T20:59:23+00:00","dateModified":"2021-11-14T22:55:55+00:00","mainEntityOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/"},"wordCount":881,"commentCount":0,"publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png","keywords":["Apache","phpMyAdmin","Ubuntu 18.04"],"articleSection":["Getting Started","Linux Basics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/","url":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/","name":"How to Create a Sudo User on Ubuntu - Dracula Servers Tutorials","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#primaryimage"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png","datePublished":"2018-11-21T20:59:23+00:00","dateModified":"2021-11-14T22:55:55+00:00","description":"Step by step tutorial on how to create and use a new sudo user on Ubuntu. With a sudo user you'll safely execute commands with administratove privileges.","breadcrumb":{"@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#primaryimage","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/11\/How-to-create-a-sudo-user-on-ubuntu.png","width":1024,"height":512,"caption":"sudo_user_ubuntu_featured_image"},{"@type":"BreadcrumbList","@id":"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/draculaservers.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How to Create a Sudo User on Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/draculaservers.com\/tutorials\/#website","url":"https:\/\/draculaservers.com\/tutorials\/","name":"Dracula Servers Tutorials","description":"Dedicated Servers","publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/draculaservers.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/draculaservers.com\/tutorials\/#organization","name":"Dracula Servers","url":"https:\/\/draculaservers.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","width":1625,"height":200,"caption":"Dracula Servers"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/931f7fa8b2126ace6edfb82775e0ec0e","name":"Vlad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g","caption":"Vlad"},"description":"Tech Support","sameAs":["https:\/\/draculaservers.com"]}]}},"_links":{"self":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/comments?post=880"}],"version-history":[{"count":3,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/880\/revisions"}],"predecessor-version":[{"id":2230,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/880\/revisions\/2230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media\/918"}],"wp:attachment":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media?parent=880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/categories?post=880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/tags?post=880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}