Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #165470

Re: Password protecting grub

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: Password protecting grub
Date 2016-03-16 13:30 +0100
Message-ID <rdiKm-rP-13@gated-at.bofh.it> (permalink)
References <rdhXY-8lR-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Mar 16, 2016 at 05:07:33PM +0530, Himanshu Shekhar wrote:
> I wish to password protect grub bootloader. I tried the steps available on
> online manuals as of RedHat, Ubuntu, etc. All experiments were on a
> VirtualBox machine, so my system remains safe. However, I didn't get
> success.
> Every time I write the line to the config file and run update-grub, I get
> the response
> "password : command not found".
> 
> I made experiments with the following files:
>   /etc/grub.d/00_header
>   /etc/grub.d/40_custom
>   /boot/grub/grub.cfg
> 
> adding
> " set superusers="root"
>   password root rootpassword
> "
> or
> " password mypassword "
> or
> " password --md5 $$$%#$ "
> 
> different times. Each time, I had the same error generated.

Note that those files are shell scripts generating scripts for grub. I think
you want the shell script outputting something like

  +----------------------
  |set superusers="foo"
  |password foo verytopsecret
  +----------------------

to its standard output, so you'll want to add

  +----------------------
  |cat <<EOF
  |set superusers="foo"
  |password foo verytopsecret
  |EOF
  +----------------------

to your /etc/grub.d/00_header. Rube Goldberg in action, but hey. I wonder
what's in store with Grub3: write a Haskell program which outputs a
shell program which outputs a Grub3 script?

Hope that helps
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlbpR4oACgkQBcgs9XrR2kaEgQCeKy5u+q+Zv7AIVK1Z2vQcHoHq
s6MAnifV5eAFBhiI3AvHYY2U3T4f2mB2
=0KKO
-----END PGP SIGNATURE-----

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Password protecting grub Himanshu Shekhar <irm2015006@iiita.ac.in> - 2016-03-16 12:40 +0100
  Re: Password protecting grub jdd <jdd@dodin.org> - 2016-03-16 13:10 +0100
    Re: Password protecting grub Himanshu Shekhar <irm2015006@iiita.ac.in> - 2016-03-16 13:20 +0100
      Re: Password protecting grub jdd <jdd@dodin.org> - 2016-03-16 13:30 +0100
        Re: Password protecting grub <tomas@tuxteam.de> - 2016-03-16 13:50 +0100
  Re: Password protecting grub <tomas@tuxteam.de> - 2016-03-16 13:30 +0100
  Re: Password protecting grub David Wright <deblis@lionunicorn.co.uk> - 2016-03-16 15:30 +0100
    Re: Password protecting grub Himanshu Shekhar <irm2015006@iiita.ac.in> - 2016-03-16 17:30 +0100
      Re: Password protecting grub arian <debian@semioptimal.net> - 2016-03-16 17:40 +0100
      Re: Password protecting grub jdd <jdd@dodin.org> - 2016-03-16 18:00 +0100
        Re: Password protecting grub Himanshu Shekhar <irm2015006@iiita.ac.in> - 2016-03-16 18:50 +0100
          Re: Password protecting grub Raj Kiran Grandhi <grajkiran@gmail.com> - 2016-03-17 07:30 +0100
            Re: Password protecting grub David Wright <deblis@lionunicorn.co.uk> - 2016-03-17 18:00 +0100
              Re: Password protecting grub Raj Kiran Grandhi <grajkiran@gmail.com> - 2016-03-18 14:40 +0100
                Re: Password protecting grub David Wright <deblis@lionunicorn.co.uk> - 2016-03-18 16:30 +0100
          Re: Password protecting grub Adam Wilson <moxalt@riseup.net> - 2016-03-17 17:10 +0100
            Re: Password protecting grub Martin Smith <lists@rakupottery.org.uk> - 2016-03-17 18:10 +0100
              Re: Password protecting grub Lisi Reisz <lisi.reisz@gmail.com> - 2016-03-17 18:40 +0100
      Re: Password protecting grub Adam Wilson <moxalt@riseup.net> - 2016-03-17 17:10 +0100

csiph-web