{"id":1386,"date":"2016-06-18T10:20:31","date_gmt":"2016-06-18T04:50:31","guid":{"rendered":"https:\/\/www.armourinfosec.com\/?p=1386"},"modified":"2020-03-30T23:34:32","modified_gmt":"2020-03-30T18:04:32","slug":"protect-grub-boot-loader-password-kali-linux","status":"publish","type":"post","link":"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/","title":{"rendered":"How to Protect Grub Boot Loader by Password in Kali Linux."},"content":{"rendered":"

How to Protect Grub Boot Loader by Password in Kali Linux.<\/h2>\n

GRand Unified Bootloader<\/strong> (GRUB<\/strong>) is a default bootloader in all Unix-like operating systems. As promised in our earlier article \u201cHow to reset a forgotten root password<\/a>“, here we are going to review how to protect GRUB<\/strong> with a password. As mentioned earlier post, anyone can login into single-user mode and may change system setting as needed. This is the big security flow. So, to prevent such unauthorized person to access system we may require to have grub with password protected.<\/p>\n

Here, we\u2019ll see how to prevent a user from entering into a single user mode and changing the settings of a system that may have direct or physical access to the system.<\/p>\n

    \n
  1. Open Kali\u00a0 Linux and then go to the terminal.<\/li>\n
  2. Go to grub.d file by the following command<\/li>\n<\/ol>\n
    # cd \u00a0\/etc\/grub.d<\/pre>\n
      \n
    1. Create the password by typing this command<\/li>\n<\/ol>\n
      # grub2-mkpasswd-pbkdf2<\/pre>\n
        \n
      1. After you enter the password, copy the whole generated code that appears.<\/li>\n
      2. Now edit the file\/etc\/grub.d\/10_linux using vim by following commands<\/li>\n<\/ol>\n
        cat << EOF\r\nset superusers=\"Username\"\r\npassword_pbkdf2 Username 'paste the generated code\u00a0\u00a0 copied above here'\r\nEOF<\/pre>\n

         <\/p>\n

          \n
        1. Save the changes and exit the editor.<\/li>\n
        2. Update grub using either of the commands;<\/li>\n<\/ol>\n
          #update-grub\r\n#grub-mkconfig -o \/boot\/grub\/grub.cfg<\/pre>\n","protected":false},"excerpt":{"rendered":"

          How to Protect Grub Boot Loader by Password in Kali Linux. GRand Unified Bootloader (GRUB) is a default bootloader in…<\/p>\n","protected":false},"author":1,"featured_media":846,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"yoast_head":"\nHow to Protect Grub Boot Loader by Password in Kali Linux. - Armour Infosec<\/title>\n<meta name=\"description\" content=\"How to Protect Grub Boot Loader by Password in Kali Linux.GRand Unified Bootloader (GRUB) is a default bootloader in all Unix-like operating systems.\" \/>\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.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Protect Grub Boot Loader by Password in Kali Linux. - Armour Infosec\" \/>\n<meta property=\"og:description\" content=\"How to Protect Grub Boot Loader by Password in Kali Linux.GRand Unified Bootloader (GRUB) is a default bootloader in all Unix-like operating systems.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Armour Infosec\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ArmourInfosec\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-18T04:50:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-30T18:04:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.armourinfosec.com\/wp-content\/uploads\/2015\/08\/CH932.png\" \/>\n\t<meta property=\"og:image:width\" content=\"450\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Armour Infosec\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ArmourInfosec\" \/>\n<meta name=\"twitter:site\" content=\"@ArmourInfosec\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Armour Infosec\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/\",\"url\":\"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/\",\"name\":\"How to Protect Grub Boot Loader by Password in Kali Linux. - Armour Infosec\",\"isPartOf\":{\"@id\":\"https:\/\/www.armourinfosec.com\/#website\"},\"datePublished\":\"2016-06-18T04:50:31+00:00\",\"dateModified\":\"2020-03-30T18:04:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308\"},\"description\":\"How to Protect Grub Boot Loader by Password in Kali Linux.GRand Unified Bootloader (GRUB) is a default bootloader in all Unix-like operating systems.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.armourinfosec.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Protect Grub Boot Loader by Password in Kali Linux.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.armourinfosec.com\/#website\",\"url\":\"https:\/\/www.armourinfosec.com\/\",\"name\":\"Armour Infosec\",\"description\":\"Do Your Part - Be Security Smart\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.armourinfosec.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308\",\"name\":\"Armour Infosec\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g\",\"caption\":\"Armour Infosec\"},\"sameAs\":[\"https:\/\/www.armourinfosec.com\/\"],\"url\":\"https:\/\/www.armourinfosec.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Protect Grub Boot Loader by Password in Kali Linux. - Armour Infosec","description":"How to Protect Grub Boot Loader by Password in Kali Linux.GRand Unified Bootloader (GRUB) is a default bootloader in all Unix-like operating systems.","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.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Protect Grub Boot Loader by Password in Kali Linux. - Armour Infosec","og_description":"How to Protect Grub Boot Loader by Password in Kali Linux.GRand Unified Bootloader (GRUB) is a default bootloader in all Unix-like operating systems.","og_url":"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/","og_site_name":"Armour Infosec","article_publisher":"https:\/\/www.facebook.com\/ArmourInfosec","article_published_time":"2016-06-18T04:50:31+00:00","article_modified_time":"2020-03-30T18:04:32+00:00","og_image":[{"width":450,"height":300,"url":"https:\/\/www.armourinfosec.com\/wp-content\/uploads\/2015\/08\/CH932.png","type":"image\/png"}],"author":"Armour Infosec","twitter_card":"summary_large_image","twitter_creator":"@ArmourInfosec","twitter_site":"@ArmourInfosec","twitter_misc":{"Written by":"Armour Infosec","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/","url":"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/","name":"How to Protect Grub Boot Loader by Password in Kali Linux. - Armour Infosec","isPartOf":{"@id":"https:\/\/www.armourinfosec.com\/#website"},"datePublished":"2016-06-18T04:50:31+00:00","dateModified":"2020-03-30T18:04:32+00:00","author":{"@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308"},"description":"How to Protect Grub Boot Loader by Password in Kali Linux.GRand Unified Bootloader (GRUB) is a default bootloader in all Unix-like operating systems.","breadcrumb":{"@id":"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.armourinfosec.com\/protect-grub-boot-loader-password-kali-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.armourinfosec.com\/"},{"@type":"ListItem","position":2,"name":"How to Protect Grub Boot Loader by Password in Kali Linux."}]},{"@type":"WebSite","@id":"https:\/\/www.armourinfosec.com\/#website","url":"https:\/\/www.armourinfosec.com\/","name":"Armour Infosec","description":"Do Your Part - Be Security Smart","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.armourinfosec.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308","name":"Armour Infosec","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g","caption":"Armour Infosec"},"sameAs":["https:\/\/www.armourinfosec.com\/"],"url":"https:\/\/www.armourinfosec.com\/author\/admin\/"}]}},"menu_order":0,"_links":{"self":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts\/1386"}],"collection":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/comments?post=1386"}],"version-history":[{"count":0,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts\/1386\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/media\/846"}],"wp:attachment":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/media?parent=1386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/categories?post=1386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/tags?post=1386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}