Users and passwords

Default password reset

Caution

This procedure involves editing the Grub bootloader to change how the operating system is loaded into memory. Use it with caution, and only if you have no other means of recovering the administrator password.

If you’ve lost your password, you can restore the default admin password without resetting all parameters to the factory defaults.

  1. Connect to HAProxy ALOHA:

    • Connect to your physical appliance through the serial port.
    • Connect to your virtual appliance through your hypervisor’s graphical console.
  2. To display the Grub menu, press ESC.

    text
    GNU Grub version 0.96 (639K lower / 1047488K upper memory)
    +-------------------------------------------------------------------+
    | Image 1 (VGA console) |
    | Image 2 (VGA console) |
    | Maintenance Kernel (serial console) |
    | Maintenance Kernel (VGA console) |
    | Reboot |
    | Halt |
    +-------------------------------------------------------------------+
    text
    GNU Grub version 0.96 (639K lower / 1047488K upper memory)
    +-------------------------------------------------------------------+
    | Image 1 (VGA console) |
    | Image 2 (VGA console) |
    | Maintenance Kernel (serial console) |
    | Maintenance Kernel (VGA console) |
    | Reboot |
    | Halt |
    +-------------------------------------------------------------------+
  3. Select Image 1, then press e.

    text
    GNU Grub version 0.96 (639K lower / 1047488K upper memory)
    +-------------------------------------------------------------------+
    | root (hd0,1) |
    | savedefault savemap |
    | kernel /sys/active/kernel.img root=/dev/ram0 ro auto quiet panic=1|
    | initrd /sys/active/initrd.img |
    +-------------------------------------------------------------------+
    text
    GNU Grub version 0.96 (639K lower / 1047488K upper memory)
    +-------------------------------------------------------------------+
    | root (hd0,1) |
    | savedefault savemap |
    | kernel /sys/active/kernel.img root=/dev/ram0 ro auto quiet panic=1|
    | initrd /sys/active/initrd.img |
    +-------------------------------------------------------------------+
  4. To edit the kernel line, select it, then press e.

    text
    [ Minimal BASH-like line editing is supported. For the first word, TAB
    lists possible command completions. Anywhere else TAB lists the possible
    completions of a device/filename. ESC at any time exits. ]
    <t panic=1 flash=sda2 imag=active vmm=kvm console=tty0
    text
    [ Minimal BASH-like line editing is supported. For the first word, TAB
    lists possible command completions. Anywhere else TAB lists the possible
    completions of a device/filename. ESC at any time exits. ]
    <t panic=1 flash=sda2 imag=active vmm=kvm console=tty0

    Info

    If you connect to a physical appliance through the serial port, the tty parameter should read ttyS0.

  5. Append INITSHELL=1 to the boot command.

    text
    <t panic=1 flash=sda2 imag=active vmm=kvm console=tty0 INITSHELL=1
    text
    <t panic=1 flash=sda2 imag=active vmm=kvm console=tty0 INITSHELL=1
  6. Press Enter.

    The Grub menu displays again.

    text
    GNU Grub version 0.96 (639K lower / 1047488K upper memory)
    +-------------------------------------------------------------------+
    | root (hd0,1) |
    | savedefault savemap |
    | kernel /sys/active/kernel.img root=/dev/ram0 ro auto quiet panic=1|
    | initrd /sys/active/initrd.img |
    +-------------------------------------------------------------------+
    text
    GNU Grub version 0.96 (639K lower / 1047488K upper memory)
    +-------------------------------------------------------------------+
    | root (hd0,1) |
    | savedefault savemap |
    | kernel /sys/active/kernel.img root=/dev/ram0 ro auto quiet panic=1|
    | initrd /sys/active/initrd.img |
    +-------------------------------------------------------------------+
  7. To boot the kernel line command, select it, then press b.

    text
    You have requested this prompt by appending INITSHELL=1 to the kernel cmd line.
    Entering command line mode : enter one command per line, end with '.'
    OK
    >
    text
    You have requested this prompt by appending INITSHELL=1 to the kernel cmd line.
    Entering command line mode : enter one command per line, end with '.'
    OK
    >
  8. To start a Bash shell, enter /bin/sh.

    text
    > /bin/sh
    sh-3.00#
    text
    > /bin/sh
    sh-3.00#
  9. From the sh-3.00# prompt, call the following commands to reset the default password, then exit the Bash console.

    bash
    cd /sbin
    restore-etc
    cat /usr/share/factory/base-etc/shadow > /etc/shadow
    config save
    exit
    bash
    cd /sbin
    restore-etc
    cat /usr/share/factory/base-etc/shadow > /etc/shadow
    config save
    exit
  10. To boot the appliance, enter . (a dot) at the new prompt.

    text
    > .
    text
    > .
  11. Log in to the appliance as user admin with the admin password.

  12. Change the default password from the Setup tab in the web UI.

  13. To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.

Do you have any suggestions on how we can improve the content of this page?