nagiosxi root password recovery

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bhvlturbo
Posts: 3
Joined: Sun Aug 04, 2013 11:26 pm

nagiosxi root password recovery

Post by bhvlturbo »

Hi,

Has anyone ever had recover the root password for nagiosxi? I have inherited an install by a previous consultant who has an alergy to documenting their config settings. I have tried to edit the boot/grub config to single user it, but I am unable to modify the grub, as you would with any other RHEL/Centos box for loading the kernel.

Any help would be awesome as it would appear no one on the internet machine has done it before.....................

Cheers,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagiosxi root password recovery

Post by scottwilkerson »

All Nagios XI installed should be installed on standard CentOS or RHEL, so as far as the system goes there is noting special about an XI install (unless the consultant changed something...)

I can tell you that the default password for our pre-created VM's is

Code: Select all

nagiosxi
If that is what this is derived from. But once it is changed from that I would have no idea..
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagiosxi root password recovery

Post by abrist »

bhvlturbo wrote:Any help would be awesome as it would appear no one on the internet machine has done it before.....................
They most definitely have. I presume this is the root user for the server itself? If so, boot the XI server from a linux livecd of your choice. If you are using vmware, boot it from the livecd iso. Mount the root filesystem, chroot into it, and then change the password:

Code: Select all

[boot from livecd]
mkdir /mnt/root_part
mount /dev/<root partition> /mnt/root_part
chroot /mnt/root_part
passwd
exit
umount /mnt/root_part
reboot
Note: Your <root partition> may be an actual partition, such as /dev/sda1 or /dev/sda2, or it may be a logical volume (if using LVM) like /dev/mapper/VolGroup...
You can find out your root partition by running the following command when booted into the server normally:

Code: Select all

df
You are looking for the Filesystem name "Mounted on /".
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bhvlturbo
Posts: 3
Joined: Sun Aug 04, 2013 11:26 pm

Re: nagiosxi root password recovery

Post by bhvlturbo »

boot the live cd was going to be my next option. I will let you know how I go.

Cheers
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagiosxi root password recovery

Post by abrist »

No problem. Make sure you download the correct live cd for your architecture.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bhvlturbo
Posts: 3
Joined: Sun Aug 04, 2013 11:26 pm

Re: nagiosxi root password recovery

Post by bhvlturbo »

Hi All,

FIXED.

Just and update on how I ended up resolving the problem. For some reason Esxi would only display the kernel boot options screen, when I configured cmos to boot from the CDROM (so I could rescue from the dvd iso), I saved the cmos and exicted, after I exited from the cmos menu the kernel boot options were displayed. I was able to boot in single user mode and reset the password. However the recovery disk option with the centos 6.4 iso would have also worked. As a test I tried rebooting the box and the grub menu is only ever displayed when you exit from cmos only.

So a little handy hint if you dont see your grub menu in Esxi force to boot cmos on startup (even if you dont want to access it to make anychanges), then exit the cmos setup and hey presto you get your kernel boot menu in which you can then modify and boot into single user mode.

Thanks for all the help guys.
Locked