Comment 3 for bug 17267

Revision history for this message
Colin Watson (cjwatson) wrote :

(In reply to comment #0)
> Here's the patch, or at least the first _untested_ version of it, to add
> preseeding support for the grub password. Admin has to set one or two keys
>
> grub-installer/password string
>
> for the password and optionally
>
> grub-installer/password-crypted boolean
>
> to specify if it is encrypted.

Thanks, committed upstream, with a few changes:

  * I fixed up some quoting so that strange characters in passwords won't
adversely affect grub-installer's operation.
  * You didn't supply template changes, so I did those.
  * I arranged for the password question to be asked in expert mode, rather than
only being available for preseeding.
  * I removed the temporary file after use.

... and:

> Actually, I think it might be stupid to allow
> preseeding unencrypted passwords, because menu.lst is world readable... But this
> patch allows it.

  * Easily solved: I made grub-installer take the world-readable bit off
menu.lst if a password is set.

Thanks!