{"id":1265,"date":"2021-10-02T14:09:01","date_gmt":"2021-10-02T14:09:01","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=1265"},"modified":"2026-05-26T13:49:04","modified_gmt":"2026-05-26T13:49:04","slug":"how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/","title":{"rendered":"How to disable &#8220;sudo su -&#8221; and &#8220;sudo passwd root&#8221; commands for wheel group users."},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>In Linux systems, users who belong to the <code>wheel<\/code> group are usually granted elevated privileges through <code>sudo<\/code>. By default, these users may also be able to switch to the root account using <code>sudo su -<\/code> or reset the root password using <code>sudo passwd root<\/code>.<\/p>\n\n\n\n<p>For security and access-control purposes, administrators may want to prevent wheel group users from:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-black-color has-text-color has-link-color wp-elements-4db495fe3fe36b7807d7ebf4c6daac81\">Switching directly to the root shell<\/li>\n\n\n\n<li class=\"has-black-color has-text-color has-link-color wp-elements-eab8a57c4f7e23cdfcec1cfaab313fc4\">Changing the root account password<\/li>\n<\/ul>\n\n\n\n<p>This guide explains how to restrict these commands while still allowing users to perform permitted administrative tasks using <code>sudo<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Prerequisites<\/h1>\n\n\n\n<p>Before proceeding, ensure the following requirements are met:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-black-color has-text-color has-link-color wp-elements-9f20a94bd20532d22067fc864ea08dfb\">Root or administrative access to the server<\/li>\n\n\n\n<li class=\"has-black-color has-text-color has-link-color wp-elements-87601244219402f081ff4ce0ad2ccf29\">A Linux server with <code>sudo<\/code> installed<\/li>\n\n\n\n<li class=\"has-black-color has-text-color has-link-color wp-elements-01bb85543710a3b3e113463a92cce42c\">Basic knowledge of Linux command-line operations<\/li>\n\n\n\n<li class=\"has-black-color has-text-color has-link-color wp-elements-29d098357cc6c02d8666f937be26ad88\">Access to edit the <code>\/etc\/sudoers<\/code> file safely using <code>visudo<\/code><\/li>\n\n\n\n<li class=\"has-black-color has-text-color has-link-color wp-elements-3d9215d95edb8c34a3ad66b1f80b4729\">Existing <code>wheel<\/code> group configured in the system<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Step 1: Create a New User<\/h1>\n\n\n\n<p>Create a new user account.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># adduser pheonix\n<\/code><\/pre>\n\n\n\n<p>Set a password for the user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># passwd pheonix\n<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Note:<\/strong> Replace <code>pheonix<\/code> with your preferred username.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Step 2: Add the User to the Wheel Group<\/h1>\n\n\n\n<p>Add the user to the <code>wheel<\/code> group to grant sudo privileges.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># gpasswd -a pheonix wheel\n<\/code><\/pre>\n\n\n\n<p>Verify the group membership:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># groups pheonix\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Step 3: Configure Sudo Restrictions<\/h1>\n\n\n\n<p>Open the sudoers configuration file using <code>visudo<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># visudo\n<\/code><\/pre>\n\n\n\n<p>Locate the following line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%wheel  ALL=(ALL)       ALL\n<\/code><\/pre>\n\n\n\n<p>Replace it with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Cmnd_Alias BLOCKSU = \/bin\/su, \/usr\/bin\/passwd root\n\n%wheel ALL=(ALL) ALL, !BLOCKSU\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"330\" src=\"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM-1024x330.png\" alt=\"\" class=\"wp-image-1266\" srcset=\"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM-1024x330.png 1024w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM-300x97.png 300w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM-768x248.png 768w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM-150x48.png 150w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM.png 1328w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Step 4: Save and Exit<\/h1>\n\n\n\n<p>Save the file and exit the editor.<\/p>\n\n\n\n<p>If using <code>vi\/vim<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>:wq\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Step 5: Verify the Restrictions<\/h1>\n\n\n\n<p>Login with the wheel user and test the commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Test <code>sudo su -<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo su -\n<\/code><\/pre>\n\n\n\n<p>Expected output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Sorry, user pheonix is not allowed to execute '\/bin\/su' as root.\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Test <code>sudo passwd root<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo passwd root<\/code><\/pre>\n\n\n\n<p>Expected output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Sorry, user pheonix is not allowed to execute '\/usr\/bin\/passwd root' as root.\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"180\" src=\"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/123456789-1024x180.png\" alt=\"\" class=\"wp-image-1267\" srcset=\"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/123456789-1024x180.png 1024w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/123456789-300x53.png 300w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/123456789-768x135.png 768w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/123456789-150x26.png 150w, https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/123456789.png 1390w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Important Notes<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-black-color has-text-color has-link-color wp-elements-044f5270c8269c693ac751cbc8650dd2\">Always use <code>visudo<\/code> instead of directly editing <code>\/etc\/sudoers<\/code> to avoid syntax errors.<\/li>\n\n\n\n<li class=\"has-black-color has-text-color has-link-color wp-elements-2bf3862e90c3fb3e21b60c3fab2110e1\">Incorrect sudoers configuration can lock out administrative access.<\/li>\n\n\n\n<li class=\"has-black-color has-text-color has-link-color wp-elements-8f0676d56d99100e61df9c1ad50cbf63\">These restrictions only block specified commands and do not remove other sudo privileges.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Conclusion<\/h1>\n\n\n\n<p>By configuring command restrictions in the <code>sudoers<\/code> file, administrators can improve system security and prevent wheel group users from gaining unrestricted root access or modifying the root password.<\/p>\n\n\n\n<p>This approach helps enforce the principle of least privilege while still allowing controlled administrative operations through <code>sudo<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In Linux systems, users who belong to the wheel group are usually granted elevated privileges through sudo. By default, these users may also be able to switch to the root account using sudo su &#8211; or reset the root password using sudo passwd root. For security and access-control purposes, administrators may want to prevent ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,2,4],"tags":[148,147,150,149],"class_list":["post-1265","post","type-post","status-publish","format-standard","hentry","category-dedicated-hosting","category-shared-hosting","category-vps-hosting","tag-disable-sudo-su","tag-sudo-su","tag-wheel-group","tag-wheel-user"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to disable &quot;sudo su -&quot; and &quot;sudo passwd root&quot; commands for wheel group users. - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to disable &quot;sudo su -&quot; and &quot;sudo passwd root&quot; commands for wheel group users. - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction In Linux systems, users who belong to the wheel group are usually granted elevated privileges through sudo. By default, these users may also be able to switch to the root account using sudo su - or reset the root password using sudo passwd root. For security and access-control purposes, administrators may want to prevent ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-02T14:09:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-26T13:49:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1328\" \/>\n\t<meta property=\"og:image:height\" content=\"428\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"knowledge-base\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"knowledge-base\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/\"},\"author\":{\"name\":\"knowledge-base\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/24ddfd756e23cf1ce3c8e5f0fb309e6b\"},\"headline\":\"How to disable &#8220;sudo su -&#8221; and &#8220;sudo passwd root&#8221; commands for wheel group users.\",\"datePublished\":\"2021-10-02T14:09:01+00:00\",\"dateModified\":\"2026-05-26T13:49:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/\"},\"wordCount\":305,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Screen-Shot-2021-10-02-at-7.17.37-PM-1024x330.png\",\"keywords\":[\"Disable SUDO SU\",\"SUDO SU\",\"Wheel Group\",\"Wheel User\"],\"articleSection\":[\"Dedicated Hosting\",\"Shared hosting\",\"VPS Hosting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/\",\"name\":\"How to disable \\\"sudo su -\\\" and \\\"sudo passwd root\\\" commands for wheel group users. - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Screen-Shot-2021-10-02-at-7.17.37-PM-1024x330.png\",\"datePublished\":\"2021-10-02T14:09:01+00:00\",\"dateModified\":\"2026-05-26T13:49:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/24ddfd756e23cf1ce3c8e5f0fb309e6b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#primaryimage\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Screen-Shot-2021-10-02-at-7.17.37-PM.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Screen-Shot-2021-10-02-at-7.17.37-PM.png\",\"width\":1328,\"height\":428},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2021\\\/10\\\/02\\\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to disable &#8220;sudo su -&#8221; and &#8220;sudo passwd root&#8221; commands for wheel group users.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/24ddfd756e23cf1ce3c8e5f0fb309e6b\",\"name\":\"knowledge-base\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7203df2304073f631b2bf04267130cc48b8b1a82bb0ec98285125d6bc3cb8ade?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7203df2304073f631b2bf04267130cc48b8b1a82bb0ec98285125d6bc3cb8ade?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7203df2304073f631b2bf04267130cc48b8b1a82bb0ec98285125d6bc3cb8ade?s=96&d=mm&r=g\",\"caption\":\"knowledge-base\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/knowledge-base\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to disable \"sudo su -\" and \"sudo passwd root\" commands for wheel group users. - PheonixSolutions Knowledge-Base","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:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/","og_locale":"en_US","og_type":"article","og_title":"How to disable \"sudo su -\" and \"sudo passwd root\" commands for wheel group users. - PheonixSolutions Knowledge-Base","og_description":"Introduction In Linux systems, users who belong to the wheel group are usually granted elevated privileges through sudo. By default, these users may also be able to switch to the root account using sudo su - or reset the root password using sudo passwd root. For security and access-control purposes, administrators may want to prevent ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2021-10-02T14:09:01+00:00","article_modified_time":"2026-05-26T13:49:04+00:00","og_image":[{"width":1328,"height":428,"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM.png","type":"image\/png"}],"author":"knowledge-base","twitter_card":"summary_large_image","twitter_misc":{"Written by":"knowledge-base","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/"},"author":{"name":"knowledge-base","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/24ddfd756e23cf1ce3c8e5f0fb309e6b"},"headline":"How to disable &#8220;sudo su -&#8221; and &#8220;sudo passwd root&#8221; commands for wheel group users.","datePublished":"2021-10-02T14:09:01+00:00","dateModified":"2026-05-26T13:49:04+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/"},"wordCount":305,"commentCount":0,"image":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#primaryimage"},"thumbnailUrl":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM-1024x330.png","keywords":["Disable SUDO SU","SUDO SU","Wheel Group","Wheel User"],"articleSection":["Dedicated Hosting","Shared hosting","VPS Hosting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/","name":"How to disable \"sudo su -\" and \"sudo passwd root\" commands for wheel group users. - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#primaryimage"},"image":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#primaryimage"},"thumbnailUrl":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM-1024x330.png","datePublished":"2021-10-02T14:09:01+00:00","dateModified":"2026-05-26T13:49:04+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/24ddfd756e23cf1ce3c8e5f0fb309e6b"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#primaryimage","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM.png","contentUrl":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-content\/uploads\/2021\/10\/Screen-Shot-2021-10-02-at-7.17.37-PM.png","width":1328,"height":428},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2021\/10\/02\/how-to-disable-sudo-su-and-sudo-passwd-root-commands-for-wheel-group-users\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to disable &#8220;sudo su -&#8221; and &#8220;sudo passwd root&#8221; commands for wheel group users."}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/24ddfd756e23cf1ce3c8e5f0fb309e6b","name":"knowledge-base","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7203df2304073f631b2bf04267130cc48b8b1a82bb0ec98285125d6bc3cb8ade?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7203df2304073f631b2bf04267130cc48b8b1a82bb0ec98285125d6bc3cb8ade?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7203df2304073f631b2bf04267130cc48b8b1a82bb0ec98285125d6bc3cb8ade?s=96&d=mm&r=g","caption":"knowledge-base"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/knowledge-base\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=1265"}],"version-history":[{"count":5,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1265\/revisions"}],"predecessor-version":[{"id":3656,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1265\/revisions\/3656"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=1265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=1265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=1265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}