{"id":1081,"date":"2016-04-15T17:11:49","date_gmt":"2016-04-15T14:11:49","guid":{"rendered":"http:\/\/www.systemcodegeeks.com\/?p=1081"},"modified":"2016-04-13T10:21:40","modified_gmt":"2016-04-13T07:21:40","slug":"use-sudoers-file-grant-superuser-privileges-linux","status":"publish","type":"post","link":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/","title":{"rendered":"How to use the sudoers file to grant superuser privileges in Linux"},"content":{"rendered":"<p>In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact the system as a whole (for example, managing packages or restarting services) or other users (adding or modifying user accounts, changing passwords or other users). Another example of a task requiring superuser privileges consists of changing the ownership or permissions of files and directories.<\/p>\n<p>To perform this kind of work, a system administrator needs to gain temporary access to the root account or use the sudo command with his \/ her regular user account, provided that such account has been previously given the appropriate permissions in the \/etc\/sudoers file. In this article we will discuss how to edit this file in order to give certain user accounts the necessary privileges to perform administrative tasks in our system.<\/p>\n<h2><b>Configuring visudo to use your preferred text editor<\/b><\/h2>\n<p>Using \/etc\/sudoers, a system administrator can control the commands a user can run impersonating other users. This file is well-commented and is basically composed of variables (known as <em>aliases<\/em>) and other user specifications.<\/p>\n<p>Although \/etc\/sudoers is a plain text file, it is strongly recommended that it is not edited by invoking a regular text editor such as nano or vim. In other words, DO NOT DO THIS:<\/p>\n<pre class=\"brush:bash\">vim \/etc\/sudoers<\/pre>\n<p>or<\/p>\n<pre class=\"brush:bash\">nano \/etc\/sudoers<\/pre>\n<p>The problem with the above approach is that it does not prevent two separate persons from editing the file. If, inadvertently, two or more people open the file for edition one of them may overwrite the changes made by other. Thus, the recommended way of editing \/etc\/sudoers consists of invoking the <code>visudo<\/code> command, which will open the file using the default text editor, which often is <strong>vi<\/strong> if the <strong>EDITOR<\/strong> environment variable has not been set. If you prefer to use <strong>nano<\/strong> instead, do:<\/p>\n<pre class=\"brush:bash\">EDITOR=\/bin\/nano\r\nexport $EDITOR\r\n<\/pre>\n<p>Please note that this will make nano your default editor only during the current session. To set it permanently, add the two lines above to your .bash_profile and source it to apply changes immediately:<\/p>\n<pre class=\"brush:bash\">echo \"EDITOR=\/bin\/nano\" &gt;&gt; ~\/.bash_profile\r\necho \"export EDITOR\" &gt;&gt; ~\/.bash_profile\r\n. ~\/.bash_profile # Note there is a dot before path to the file!\r\n<\/pre>\n<p>That said, you will now be able to use either vi or nano to edit \/etc\/sudoers when you invoke <code>visudo<\/code> in the command line. When someone is using <code>visudo<\/code> to edit this file, other people will NOT be able to do the same, and will get the following error if he or she attempts to do it, as we can see in Fig. 1:<\/p>\n<figure id=\"attachment_1082\" aria-describedby=\"caption-attachment-1082\" style=\"width: 518px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/01sudoers.png\" rel=\"attachment wp-att-1082\"><img decoding=\"async\" class=\"size-full wp-image-1082\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/01sudoers.png\" alt=\"Figure 1: Visudo prevents other users from accessing \/etc\/sudoers for edition at the same time\" width=\"518\" height=\"328\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/01sudoers.png 518w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/01sudoers-300x190.png 300w\" sizes=\"(max-width: 518px) 100vw, 518px\" \/><\/a><figcaption id=\"caption-attachment-1082\" class=\"wp-caption-text\">Figure 1: Visudo prevents other users from accessing \/etc\/sudoers for edition at the same time<\/figcaption><\/figure>\n<p>That said, let&#8217;s dive into \/etc\/sudoers with <code>visudo<\/code>.<\/p>\n<h2><b>Using visudo to edit \/etc\/sudoers and introducing aliases<\/b><\/h2>\n<p>After invoking visudo from the command line, the file will be opened using the text editor you chose previously. Let\u2019s begin by taking a look at aliases, which allow us to set more convenient names for groups of hosts, users, and commands. Thus, you can use an alias to define a group and use the alias name to refer to it afterwards instead of naming each host, user, or command separately.<\/p>\n<p>Host aliases are used to specify groups of hosts. The following line in \/etc\/sudoers indicates that when we use <b>FILESERVERS<\/b> we are actually referring to hosts <b>fs1<\/b> AND <b>fs2<\/b>.<\/p>\n<pre class=\"brush:bash\">Host_Alias \u00a0\u00a0\u00a0 FILESERVERS = fs1, fs2<\/pre>\n<p>The following user alias specify that gacanepa AND scg can be referred to as ADMINS in the file.<\/p>\n<pre class=\"brush:bash\">User_Alias ADMINS = gacanepa, scg<\/pre>\n<p>If instead we want to allow ALL users to be part of ADMINS except for the ones mentioned above, we would do<\/p>\n<pre class=\"brush:bash\">User_Alias ADMINS = ALL, !gacanepa, !scg<\/pre>\n<p>The exclamation sign, when used as a prefix for an object in an alias, explicitly eliminates it from the specified group.<\/p>\n<div class=\"tip\">Another method of grouping users to grant superuser permissions is utilizing Linux groups. You can either use this approach or User_Alias depending on the number of persons you want to give root privileges to. We will explain later how to use Linux groups for this as well.<\/div>\n<p>Finally, you can create as many command aliases as you need to reference related group of commands.<\/p>\n<pre class=\"brush:bash\">Cmnd_Alias SOFTWARE = \/bin\/rpm, \/usr\/bin\/yum\r\nCmnd_Alias STORAGE = \/sbin\/fdisk, \/sbin\/parted\r\n<\/pre>\n<p>The first line above (<strong>SOFTWARE<\/strong>) indicates that we can refer to <code>rpm<\/code> and <code>yum<\/code> as <strong>SOFTWARE<\/strong>, whereas the second specifies that <strong>STORAGE<\/strong> is a placeholder for <code>fdisk<\/code> and <code>parted<\/code>.<\/p>\n<h2><b>Granting permissions through user specifications<\/b><\/h2>\n<p>With the above aliases in place we are ready to add or edit user specifications. Particularly, we will use SOFTWARE and STORAGE in order to give users <b>gacanepa <\/b>and <b>scg <\/b>permissions to run the commands specified in those variables. To do that, let\u2019s add the following line to <code>\/etc\/sudoers<\/code>:<\/p>\n<pre class=\"brush:bash\">ADMINS ALL=(root) SOFTWARE, STORAGE<\/pre>\n<p>The above line specifies that members of the ADMINS User_Alias (who) can run, on ALL hosts (where) as root (as who), the commands listed in the indicated Cmnd_Alias(es).<\/p>\n<p>In other words, we can infer that the basic syntax of a user specification in <code>\/etc\/sudoers<\/code> is:<\/p>\n<pre class=\"brush:bash\">WHO WHERE=(AS WHO) WHAT<\/pre>\n<p>To indicate the WHO using regular Linux groups, we need to use a % sign followed by the group name. Other than that, the syntax is identical to the previous example. To illustrate, let\u2019s give members of group developers permissions to run <code>updatedb<\/code> as root. By using the <code>NOPASSWD<\/code> tag, we will allow them to run that command without entering their password (note that it is not necessary to specify the AS WHO here as no password will be required)::<\/p>\n<pre class=\"brush:bash\">%developers ALL=NOPASSWD:\/usr\/bin\/updatedb<\/pre>\n<p>Once you have finished editing \/etc\/sudoers, save changes and run <code>visudo -c<\/code> to check the configuration file for errors. If no errors are found, you will get the message shown in the left of Fig. 2, whereas if something is wrong, you will be prompted to make the necessary corrections in the indicated line (as shown in the middle and right of Fig. 2).<\/p>\n<figure id=\"attachment_1083\" aria-describedby=\"caption-attachment-1083\" style=\"width: 724px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/02sudoers.png\" rel=\"attachment wp-att-1083\"><img decoding=\"async\" class=\"size-full wp-image-1083\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/02sudoers.png\" alt=\"Figure 2: Checking the syntax of \/etc\/sudoers and correcting errors where found\" width=\"724\" height=\"116\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/02sudoers.png 724w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/04\/02sudoers-300x48.png 300w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/a><figcaption id=\"caption-attachment-1083\" class=\"wp-caption-text\">Figure 2: Checking the syntax of <code>\/etc\/sudoers<\/code> and correcting errors where found<\/figcaption><\/figure>\n<p>After you have fixed the errors found, members of the <strong>developers<\/strong> group will be able to execute <code>updatedb<\/code> without password. Additionally, if a particular member of the developers group is logged on while you are making these changes, he or she will need to log out and log back in to see the changes.<\/p>\n<h2><b>Summary<\/b><\/h2>\n<p>In this article we have explained how to properly edit the \/etc\/sudoers file in order to grant superuser privileges to users and groups. This will allow them to run commands and perform tasks that require root permissions without giving them access to the root account.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact the system as a whole (for example, managing packages or restarting services) or other users (adding or modifying user accounts, changing passwords or other users). Another example of a task requiring &hellip;<\/p>\n","protected":false},"author":15,"featured_media":192,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use the sudoers file to grant superuser privileges in Linux - System Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use the sudoers file to grant superuser privileges in Linux - System Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"System Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/systemcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/gacanepa\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-15T14:11:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gabriel Canepa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@gacanepa\" \/>\n<meta name=\"twitter:site\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gabriel Canepa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/\"},\"author\":{\"name\":\"Gabriel Canepa\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f\"},\"headline\":\"How to use the sudoers file to grant superuser privileges in Linux\",\"datePublished\":\"2016-04-15T14:11:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/\"},\"wordCount\":1063,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/\",\"name\":\"How to use the sudoers file to grant superuser privileges in Linux - System Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"datePublished\":\"2016-04-15T14:11:49+00:00\",\"description\":\"In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact\",\"breadcrumb\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.systemcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/linux\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to use the sudoers file to grant superuser privileges in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"name\":\"System Code Geeks\",\"description\":\"Operating System Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/systemcodegeeks\",\"https:\/\/x.com\/systemcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f\",\"name\":\"Gabriel Canepa\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g\",\"caption\":\"Gabriel Canepa\"},\"description\":\"Gabriel Canepa is a Linux Foundation Certified System Administrator (LFCS-1500-0576-0100) and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. When he's not typing commands or writing code or articles, he enjoys telling bedtime stories with his wife to his two little daughters and playing with them, the great pleasure of his life.\",\"sameAs\":[\"http:\/\/www.gabrielcanepa.com.ar\/\",\"https:\/\/www.facebook.com\/gacanepa\",\"https:\/\/ar.linkedin.com\/in\/gacanepa\",\"https:\/\/x.com\/gacanepa\"],\"url\":\"https:\/\/www.systemcodegeeks.com\/author\/gabriel-canepa\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use the sudoers file to grant superuser privileges in Linux - System Code Geeks - 2026","description":"In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact","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:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to use the sudoers file to grant superuser privileges in Linux - System Code Geeks - 2026","og_description":"In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact","og_url":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/","og_site_name":"System Code Geeks","article_publisher":"https:\/\/www.facebook.com\/systemcodegeeks","article_author":"https:\/\/www.facebook.com\/gacanepa","article_published_time":"2016-04-15T14:11:49+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","type":"image\/jpeg"}],"author":"Gabriel Canepa","twitter_card":"summary_large_image","twitter_creator":"@gacanepa","twitter_site":"@systemcodegeeks","twitter_misc":{"Written by":"Gabriel Canepa","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#article","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/"},"author":{"name":"Gabriel Canepa","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f"},"headline":"How to use the sudoers file to grant superuser privileges in Linux","datePublished":"2016-04-15T14:11:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/"},"wordCount":1063,"commentCount":0,"publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/","url":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/","name":"How to use the sudoers file to grant superuser privileges in Linux - System Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","datePublished":"2016-04-15T14:11:49+00:00","description":"In a Linux system there are tasks that need to be performed using administrative privileges (also known as superuser permissions) as they either impact","breadcrumb":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#primaryimage","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemcodegeeks.com\/linux\/use-sudoers-file-grant-superuser-privileges-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Linux","item":"https:\/\/www.systemcodegeeks.com\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"How to use the sudoers file to grant superuser privileges in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.systemcodegeeks.com\/#website","url":"https:\/\/www.systemcodegeeks.com\/","name":"System Code Geeks","description":"Operating System Developers Resource Center","publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.systemcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.systemcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/systemcodegeeks","https:\/\/x.com\/systemcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f","name":"Gabriel Canepa","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g","caption":"Gabriel Canepa"},"description":"Gabriel Canepa is a Linux Foundation Certified System Administrator (LFCS-1500-0576-0100) and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. When he's not typing commands or writing code or articles, he enjoys telling bedtime stories with his wife to his two little daughters and playing with them, the great pleasure of his life.","sameAs":["http:\/\/www.gabrielcanepa.com.ar\/","https:\/\/www.facebook.com\/gacanepa","https:\/\/ar.linkedin.com\/in\/gacanepa","https:\/\/x.com\/gacanepa"],"url":"https:\/\/www.systemcodegeeks.com\/author\/gabriel-canepa\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1081"}],"version-history":[{"count":0,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1081\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media\/192"}],"wp:attachment":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}