{"id":1047,"date":"2024-05-06T21:42:26","date_gmt":"2024-05-07T00:42:26","guid":{"rendered":"https:\/\/helpsysadmin.com.br\/blog\/adding-deleting-and-granting-sudo-privileges-for-users-in-ubuntu-22-04-lts\/"},"modified":"2025-11-07T07:16:28","modified_gmt":"2025-11-07T10:16:28","slug":"adding-deleting-and-granting-sudo-privileges","status":"publish","type":"post","link":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/","title":{"rendered":"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS"},"content":{"rendered":"<div id=\"helps-3832480158\" class=\"helps-before-content-2 helps-entity-placement\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-3661896953164277\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<!-- 2anuncios display quadrado -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-3661896953164277\"\r\n     data-ad-slot=\"5051229894\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div>\n<p class=\"wp-block-paragraph\">This tutorial explains how to add, delete and grant sudo privileges to users on the Ubuntu <a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-instalar-crowdsec\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Como instalar Crowdsec\" target=\"_blank\" rel=\"noopener\">Linux<\/a> operating system. The guide is officially tested on Ubuntu 22.04 and 20.04 LTS editions.<\/p>\n\n<p class=\"wp-block-paragraph\">Before getting into the topic, let&#8217;s see what sudo is and its benefits.<\/p>\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-1-o-que-e-sudo\">1. What is sudo?<\/h2>\n\n<p class=\"wp-block-paragraph\">In Linux and Unix operating systems, there is a special user called \u2013 root. The root user can do anything and everything on a Linux or Unix system.<\/p>\n\n<p class=\"wp-block-paragraph\">Using the root user for day-to-day activities can be dangerous and is not recommended. One wrong command can destroy the entire system! That&#8217;s where &#8220;sudo&#8221; comes in.<\/p>\n\n<p class=\"wp-block-paragraph\">Sudo allows authorized users to perform tasks with root-level privileges, even if they do not know the root user&#8217;s password.<\/p>\n\n<p class=\"wp-block-paragraph\">This is why it is important to create a regular user and add it to the sudo user group to perform administrative tasks. Therefore, this user can act as both a regular user and an administrative user when executing commands prefixed with sudo.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-2-beneficios-de-ser-sudo\">2. Benefits of being sudo<\/h2>\n\n<p class=\"wp-block-paragraph\">You don&#8217;t need to share the root password with other users. <\/p>\n\n<p class=\"wp-block-paragraph\">Users do not need to know the root user password to perform administrative tasks. <\/p>\n\n<p class=\"wp-block-paragraph\">When performing an administrative task, users will be prompted for the sudo password before any changes can occur to the system. It should make users think about the consequences of what they are doing. <\/p>\n\n<p class=\"wp-block-paragraph\">Administrator rights can be easily granted to users and revoked at any time if they are no longer needed. <\/p>\n\n<p class=\"wp-block-paragraph\">Some Linux distributions, for example Ubuntu, disable the root user by default, so there is no way to launch brute force attacks on the root user. Even if someone tried, it would be useless because there is no root password to crack. <\/p>\n\n<p class=\"wp-block-paragraph\">More importantly, the sudo session will exit after a short while. If you left the terminal open after running some commands with sudo permission, authentication automatically expires. Therefore, other users cannot perform other administrative tasks. By default, the sudo password is remembered for 15 minutes in the current session. After that, you need to enter the password again. <\/p>\n\n<p class=\"wp-block-paragraph\">You can monitor the command line activity of sudo users. sudo adds a log entry of commands executed by users to the \/var\/log\/auth.log file. If there is a problem, you can look at these commands and try to figure out what went wrong.<\/p>\n\n<p class=\"wp-block-paragraph\">These are some advantages of being a sudo user. Now, let&#8217;s see how to add, delete and grant Sudo privileges to users in Ubuntu Linux.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-adicionar-novo-usuario-no-ubuntu-linux\">Add new user in Ubuntu Linux<\/h2>\n\n<p class=\"wp-block-paragraph\">First, let&#8217;s create a common user, e.g. <strong>&#8220;helpsysadmin&#8221;<\/strong> .<\/p>\n\n<p class=\"wp-block-paragraph\">Execute<\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>sudo adduser helpsysadmin<\/pre><\/div>\n\n<p class=\"wp-block-paragraph\">Replace helpsysadmin with whatever username you want.<\/p>\n\n<p class=\"wp-block-paragraph\">Inform your password <\/p>\n\n<p class=\"wp-block-paragraph\"><strong>example output: <\/strong><\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Adding user helpsysadmin' ... Adding new grouphelpsysadmin' (1001) \u2026\nAdding new user helpsysadmin' (1000) with grouphelpsysadmin' \u2026\nCreating home directory \/home\/helpsysadmin' ... Copying files from\/etc\/skel' \u2026\nEnter new UNIX password:\nRetype new UNIX password:\npasswd: password updated successfully\nChanging the user information for helpsysadmin\nEnter the new value, or press ENTER for the default\nFull Name []:\nRoom Number []:\nWork Phone []:\nHome Phone []:\nOther []:\nIs the information correct? [Y\/n] y<\/pre><\/div>\n\n<p class=\"wp-block-paragraph\"><br\/>We just created a new user called &#8220;helpsysadmin&#8221;. This user has not yet been granted sudo access, so he cannot perform any administrative tasks.<\/p>\n\n<p class=\"wp-block-paragraph\">You can check whether a user has sudo access or not with the command below<\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>sudo -l -U helpsysadmin<\/pre><\/div>\n\n<p class=\"wp-block-paragraph\">you will see:<\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>User helpsysadmin is not allowed to run sudo on server<\/pre><\/div>\n\n<h2 class=\"wp-block-heading\" id=\"h-conceder-privilegios-sudo-aos-usuarios-no-ubuntu-linux\">Grant Sudo Privileges to Users in Ubuntu Linux<\/h2>\n\n<p class=\"wp-block-paragraph\">Add the newly created user to the <strong>sudo group<\/strong> using the following command:<\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>usermod -aG sudo helpsysadmin<\/pre><\/div>\n\n<p class=\"wp-block-paragraph\">To test the new permissions <code>sudo<\/code> are in operation, first use the command <code>su<\/code> To switch to the new user account:<\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>su - helpsysadmin<\/pre><\/div>\n\n<p class=\"wp-block-paragraph\">As the new user, make sure you can use <code>sudo<\/code> by placing <code>sudo<\/code> before the command you want to run with superuser privileges. example<\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>sudo apt update\nsudo apt upgrade<\/pre><\/div>\n\n<p class=\"wp-block-paragraph\">A regular user would not be allowed to execute the above commands<\/p>\n\n<p class=\"wp-block-paragraph\">The first time you use <code>sudo<\/code> in a session, you will be prompted for that user&#8217;s account password. Enter password to continue:<\/p>\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Output:\n[sudo] password for helpsysadmin:<\/pre><\/div>\n\n<p class=\"wp-block-paragraph\">If the user is in the correct group and you enter the password correctly, the command you issued with <code>sudo<\/code> will be executed with <strong>root<\/strong> privileges.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial explains how to add, delete and grant sudo privileges to users on the Ubuntu Linux operating system. The guide is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1046,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1209,1204],"tags":[1211,1213,1215,1217],"class_list":["post-1047","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-server-management","tag-linux-en","tag-linux-server","tag-safety","tag-ubuntu-en-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.9 (Yoast SEO v27.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS - Blog HelpSysAdmin<\/title>\n<meta name=\"description\" content=\"Complete guide on how to add, remove, and grant superuser (sudo) privileges to users in Ubuntu 22.04 LTS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS\" \/>\n<meta property=\"og:description\" content=\"Complete guide on how to add, remove, and grant superuser (sudo) privileges to users in Ubuntu 22.04 LTS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog HelpSysAdmin\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-07T00:42:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-07T10:16:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2024\/05\/sudo-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"839\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"HelpSysAdmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brhelpsysad\" \/>\n<meta name=\"twitter:site\" content=\"@brhelpsysad\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/\"},\"author\":{\"name\":\"HelpSysAdmin\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/bdbe3d7d71a0c6a3cb474c18da574efb\"},\"headline\":\"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS\",\"datePublished\":\"2024-05-07T00:42:26+00:00\",\"dateModified\":\"2025-11-07T10:16:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/\"},\"wordCount\":622,\"publisher\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2024\\/05\\/sudo-2.png\",\"keywords\":[\"linux\",\"linux server\",\"safety\",\"ubuntu\"],\"articleSection\":[\"Security\",\"server management\"],\"inLanguage\":\"pt-BR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/\",\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/\",\"name\":\"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS - Blog HelpSysAdmin\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2024\\/05\\/sudo-2.png\",\"datePublished\":\"2024-05-07T00:42:26+00:00\",\"dateModified\":\"2025-11-07T10:16:28+00:00\",\"description\":\"Complete guide on how to add, remove, and grant superuser (sudo) privileges to users in Ubuntu 22.04 LTS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/#primaryimage\",\"url\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2024\\/05\\/sudo-2.png\",\"contentUrl\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2024\\/05\\/sudo-2.png\",\"width\":1200,\"height\":839,\"caption\":\"sudo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/en\\\/adding-deleting-and-granting-sudo-privileges\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\",\"name\":\"Blog HelpSysAdmin\",\"description\":\"Webserver linux blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#organization\"},\"alternateName\":\"HelpSysAdmin Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#organization\",\"name\":\"HelpSysAdmin Gerenciamento de Servidores\",\"alternateName\":\"HelpSysAdmin\",\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\/\\/mlkpd8g42nae.i.optimole.com\\/w:512\\/h:512\\/q:mauto\\/f:best\\/https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2020\\/12\\/favicon.png\",\"contentUrl\":\"https:\\/\\/mlkpd8g42nae.i.optimole.com\\/w:512\\/h:512\\/q:mauto\\/f:best\\/https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2020\\/12\\/favicon.png\",\"width\":512,\"height\":512,\"caption\":\"HelpSysAdmin Gerenciamento de Servidores\"},\"image\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/brhelpsysad\",\"https:\\\/\\\/mastodon.social\\\/@helpsysadmin\"],\"description\":\"Oferecemos o gerenciamento de servidores dedicados, vps ou cloud. Apresentamos a melhor experi\u00eancia em atendimento e servi\u00e7o. Nosso time cuidar\u00e1 do seu servidor com backups, an\u00e1lises constantes, ajustes de seguran\u00e7a, realiza\u00e7\u00e3o de manuten\u00e7\u00e3o preventiva e corretiva, otimiza\u00e7\u00e3o de performance al\u00e9m de monitoramento 24\u00d77 com suporte Pr\u00f3 Ativo.\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1\",\"maxValue\":\"10\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/bdbe3d7d71a0c6a3cb474c18da574efb\",\"name\":\"HelpSysAdmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g\",\"caption\":\"HelpSysAdmin\"},\"sameAs\":[\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS - Blog HelpSysAdmin","description":"Complete guide on how to add, remove, and grant superuser (sudo) privileges to users in Ubuntu 22.04 LTS.","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:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/","og_locale":"pt_BR","og_type":"article","og_title":"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS","og_description":"Complete guide on how to add, remove, and grant superuser (sudo) privileges to users in Ubuntu 22.04 LTS.","og_url":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/","og_site_name":"Blog HelpSysAdmin","article_published_time":"2024-05-07T00:42:26+00:00","article_modified_time":"2025-11-07T10:16:28+00:00","og_image":[{"width":1200,"height":839,"url":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2024\/05\/sudo-2.png","type":"image\/png"}],"author":"HelpSysAdmin","twitter_card":"summary_large_image","twitter_creator":"@brhelpsysad","twitter_site":"@brhelpsysad","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/#article","isPartOf":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/"},"author":{"name":"HelpSysAdmin","@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/person\/bdbe3d7d71a0c6a3cb474c18da574efb"},"headline":"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS","datePublished":"2024-05-07T00:42:26+00:00","dateModified":"2025-11-07T10:16:28+00:00","mainEntityOfPage":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/"},"wordCount":622,"publisher":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#organization"},"image":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/#primaryimage"},"thumbnailUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2024\/05\/sudo-2.png","keywords":["linux","linux server","safety","ubuntu"],"articleSection":["Security","server management"],"inLanguage":"pt-BR"},{"@type":"WebPage","@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/","url":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/","name":"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS - Blog HelpSysAdmin","isPartOf":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/#primaryimage"},"image":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/#primaryimage"},"thumbnailUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2024\/05\/sudo-2.png","datePublished":"2024-05-07T00:42:26+00:00","dateModified":"2025-11-07T10:16:28+00:00","description":"Complete guide on how to add, remove, and grant superuser (sudo) privileges to users in Ubuntu 22.04 LTS.","breadcrumb":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/#primaryimage","url":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2024\/05\/sudo-2.png","contentUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2024\/05\/sudo-2.png","width":1200,"height":839,"caption":"sudo"},{"@type":"BreadcrumbList","@id":"https:\/\/helpsysadmin.com.br\/blog\/en\/adding-deleting-and-granting-sudo-privileges\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/helpsysadmin.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"Adding, Deleting and Granting Sudo Privileges for Users in Ubuntu 22.04 LTS"}]},{"@type":"WebSite","@id":"https:\/\/helpsysadmin.com.br\/blog\/#website","url":"https:\/\/helpsysadmin.com.br\/blog\/","name":"Blog HelpSysAdmin","description":"Webserver linux blog","publisher":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#organization"},"alternateName":"HelpSysAdmin Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/helpsysadmin.com.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/helpsysadmin.com.br\/blog\/#organization","name":"HelpSysAdmin Gerenciamento de Servidores","alternateName":"HelpSysAdmin","url":"https:\/\/helpsysadmin.com.br\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:512\/h:512\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2020\/12\/favicon.png","contentUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:512\/h:512\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2020\/12\/favicon.png","width":512,"height":512,"caption":"HelpSysAdmin Gerenciamento de Servidores"},"image":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/brhelpsysad","https:\/\/mastodon.social\/@helpsysadmin"],"description":"Oferecemos o gerenciamento de servidores dedicados, vps ou cloud. Apresentamos a melhor experi\u00eancia em atendimento e servi\u00e7o. Nosso time cuidar\u00e1 do seu servidor com backups, an\u00e1lises constantes, ajustes de seguran\u00e7a, realiza\u00e7\u00e3o de manuten\u00e7\u00e3o preventiva e corretiva, otimiza\u00e7\u00e3o de performance al\u00e9m de monitoramento 24\u00d77 com suporte Pr\u00f3 Ativo.","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1","maxValue":"10"}},{"@type":"Person","@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/person\/bdbe3d7d71a0c6a3cb474c18da574efb","name":"HelpSysAdmin","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g","caption":"HelpSysAdmin"},"sameAs":["https:\/\/helpsysadmin.com.br\/blog\/"]}]}},"lang":"en","translations":{"en":1047},"pll_sync_post":{},"_links":{"self":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts\/1047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/comments?post=1047"}],"version-history":[{"count":4,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts\/1047\/revisions"}],"predecessor-version":[{"id":1564,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts\/1047\/revisions\/1564"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/media\/1046"}],"wp:attachment":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/media?parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/categories?post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/tags?post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}