Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub.lns unable to handle password entries in grub.conf for specific titles #229

Closed
droyden opened this issue Apr 14, 2015 · 1 comment
Closed

Comments

@droyden
Copy link

droyden commented Apr 14, 2015

Grub.lns is currently unable to handle a password entry within a specific title (encountered under RHEL6).

It returns this error:

Could not evaluate: Augeas didn't load /boot/grub/grub.conf with Grub.lns: Iterated lens matched less than it should (line:27, character:0)

When line 27 is:

password --md5 <encrypted password>

or

password --encrypted <encrypted password> 

Full grub.conf is:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --encrypted <other encrypted password>
title Red Hat Enterprise Linux Server (2.6.32-504.1.3.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-504.1.3.el6.x86_64 ro root=/dev/mapper/lvgSystem-lvRoot rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk rd_LVM_LV=lvgSystem/lvSwap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=lvgSystem/lvRoot LANG=en_GB rd_NO_DM
        initrd /initramfs-2.6.32-504.1.3.el6.x86_64.img
title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/lvgSystem-lvRoot rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk rd_LVM_LV=lvgSystem/lvSwap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=lvgSystem/lvRoot LANG=en_GB rd_NO_DM
        initrd /initramfs-2.6.32-504.el6.x86_64.img
title Password Protected Kernel
        root (hd0,0)
        kernel /vmlinuz-2.6.32-504.1.3.el6.x86_64 ro root=/dev/mapper/lvgSystem-lvRoot rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=uk rd_LVM_LV=lvgSystem/lvSwap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=lvgSystem/lvRoot LANG=en_GB rd_NO_DM
        initrd /initramfs-2.6.32-504.1.3.el6.x86_64.img
        password --md5 <encrypted password>

This can be demonstrated via the example puppet manifest:

    kernel_parameter { "clocksource":
            ensure => present,
            value  => "acpi_pm",
            target => "/tmp/grub_nopasswd.conf",
    }

Error: /Stage[main]/Main/Kernel_parameter[clocksource]: Could not evaluate: Augeas didn't load /tmp/grub_nopasswd.conf with Grub.lns: Iterated lens matched less than it should (line:27, character:0)

@lutter lutter closed this as completed in 16c9bf2 May 22, 2015
@lutter
Copy link
Member

lutter commented May 22, 2015

Thanks for reporting this. Fixed with commit 16c9bf2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants