Page 1 of 1
nagiosxi root password recovery
Posted: Sun Aug 04, 2013 11:44 pm
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,
Re: nagiosxi root password recovery
Posted: Mon Aug 05, 2013 10:20 am
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
If that is what this is derived from. But once it is changed from that I would have no idea..
Re: nagiosxi root password recovery
Posted: Mon Aug 05, 2013 10:21 am
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:
You are looking for the Filesystem name "Mounted on /".
Re: nagiosxi root password recovery
Posted: Mon Aug 05, 2013 6:41 pm
by bhvlturbo
boot the live cd was going to be my next option. I will let you know how I go.
Cheers
Re: nagiosxi root password recovery
Posted: Tue Aug 06, 2013 9:27 am
by abrist
No problem. Make sure you download the correct live cd for your architecture.
Re: nagiosxi root password recovery
Posted: Tue Aug 06, 2013 9:44 pm
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.