XOS password recovery

book

Article ID: 168082

calendar_today

Updated On:

Products

XOS

Issue/Introduction

Recovery procedures for admin and/or root passwordsN/A

Cause

Need a procedure to recover the admin or root password in the event the passwords are either lost or forgotten.

Resolution

Recovery procedure from lost or forgotten admin passwords:

1) If root password is known then you simply need to log in as root via the console port and do the following:

[[email protected] root]# passwd admin
New UNIX password: <mynewpasswd>
Retype new UNIX password: <mynewpasswd>
passwd: all authentication tokens updated successfully
[[email protected] root]# logout

Log in as admin user using the new password.

####-------------------------------------------------####

If the root password is not known it can be changed a couple of different ways and will differ based on the boat loader that you are currently using.

LILO RECOVERY:

2) Direct console access to the CPM is required for lost or forgotten passwords.

- Reboot the CPM. This can be done with CLI ""reload"", Unix ""reboot"", reset button, or power cycling the card/system.
- As the system reboots look for the LILO prompt, hit Tab key, the system stops at the "boot:" prompt, waiting for command. Type "linux single""<cr>
- Password: "x40rocks"
- The command "passwd" will prompt the user for new root password.

Example:

LILO boot: <Tab>
linux
boot: linux single
Password: x40rocks
bash# passwd <--- This will invoke it so you to are prompted for new password
New UNIX password: <mynewpasswd>
Retype new UNIX password: <mynewpasswd>
passwd: all authentication tokens updated successfully
bash# ctrl + d
<----- This will allow you to continue through the boot process without having to reload the entire CPM

Once the system boots you can log in as root using the new password and then reste the admin password usning the following command:

[[email protected] root]# passwd admin
New UNIX password: <mynewpasswd>
Retype new UNIX password: <mynewpasswd>
passwd: all authentication tokens updated successfully
[[email protected] root]#
logout

Log in as admin user

####--------------------------------------------------####

GRUB RECOVERY

1) Direct console access to the CPM is required for recovering lost or forgotten passwords.
- Reboot the CPM. This can be done with CLI ""reload"", Unix ""reboot"", reset button, or power cycle the card/system.
- As the system reboots look for this prompt:

-------------------------------------------------------------------
0: Linux (2.4.18-5)
-------------------------------------------------------------------

Use the up and down arrow keys to select which entry is highlighted.
Press Enter to boot the selected OS or 'p' to enter a
password to unlock the next set of features.


Type "p" to be prompted for the password:

The selected entry is 0
Password: "x40rocks"

Next you will see the following:

GRUB version 0.91 (640K lower / 523264K upper memory)
Distribution 1
-------------------------------------------------------------------
0: Linux (2.4.18-5)
-------------------------------------------------------------------

Use the up and down arrow keys to select which entry is highlighted.
Press enter to boot the selected OS, 'e' to edit the
commands before booting, 'a' to modify the kernel arguments
before booting, or 'c' for a command-line.

Highlighted entry is 1: e


Type "e" for edit and the following then comes up:

GRUB version 0.91 (640K lower / 523264K upper memory)
Distribution 1
-------------------------------------------------------------------
0: root (hd0,0)
1: kernel /vmlinuz-2.4.18-5 ro root=/dev/hda7 console=ttyS0,9600n8
-------------------------------------------------------------------

Use the up and down arrow keys to select which entry is highlighted.
Press 'b' to boot, 'e' to edit the selected command in the
boot sequence, 'c' for a command-line, 'o' to open a new line
after ('O' for before) the selected line, 'd' to remove the
selected line, or escape to go back to the main menu.


Highlighted entry is 1: e


Type "e" for edit and the following then comes up:

GRUB version 0.91 (640K lower / 523264K upper memory)
Distribution 1
-------------------------------------------------------------------
0: root (hd0,0)
1: kernel /vmlinuz-2.4.18-5 ro root=/dev/hda7 console=ttyS0,9600n8
-------------------------------------------------------------------

Use the up and down arrow keys to select which entry is highlighted.
Press 'b' to boot, 'e' to edit the selected command in the
boot sequence, 'c' for a command-line, 'o' to open a new line
after ('O' for before) the selected line, 'd' to remove the
selected line, or escape to go back to the main menu.

Highlighted entry is 1: e


Use down arrow so that the line "Highlighted entry is 1 and then press e

The following appears:

Highlighted entry is 1: [ 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. ]

grub edit> kernel /vmlinuz-2.4.18-5 ro root=/dev/hda7 console=ttyS0,9600n8 single

You want to then type the word "single" at the end of this line, depending on your terminal emulation you may not see the last 3 letters you type but just hit return and the ensuing screen should show you the entire line as it should be:

kernel /vmlinuz-2.4.18-5 ro root=/dev/hda7 console=ttyS0,9600n8 single

One you hit enter it will bring you back to the main menu:

GRUB version 0.91 (640K lower / 523264K upper memory)
Distribution 1
-------------------------------------------------------------------
0: root (hd0,0)
1: kernel /vmlinuz-2.4.18-5 ro root=/dev/hda7 console=ttyS0,9600n8 single
-------------------------------------------------------------------

Use the up and down arrow keys to select which entry is highlighted.
Press 'b' to boot, 'e' to edit the selected command in the
boot sequence, 'c' for a command-line, 'o' to open a new line
after ('O' for before) the selected line, 'd' to remove the
selected line, or escape to go back to the main menu.

Highlighted entry is 1:b


Type "b" to boot into single user mode.

Once at the unix prompt you simply type the following:

bash# passwd <--- This will invoke it so you to are prompted for new password
New UNIX password: <mynewpasswd>
Retype new UNIX password: <mynewpasswd>
passwd: all authentication tokens updated successfully
bash# ctrl + d
<----- This will allow you to continue through the boot process without having to reload the entire CPM

Once the system boots you can log in as root and then run the command:

[[email protected] root]# passwd admin
New UNIX password: <mynewpasswd>
Retype new UNIX password: <mynewpasswd>
passwd: all authentication tokens updated successfully
[[email protected] root]# logout

Log in as admin user


Workaround

N/A