Cartika Support Portal

            Reset password manually in OnApp

            When password reset in onApp fails or does not work you can manually reset the password with the following process
             
            1. Reboot in recovery.
            2. Login via recovery with user/password being root/recovery or root/defaultrootpassword <-- could be either one, depends on if it was able to set it to the default or not.
            3. fdisk -l #Check for the disk that has the same size as the one this VM has. ex: 50GB, you'll probably see 49.something GB here, but that's the one. Normally it's /dev/vda or /dev/xvda, depends on the distribution. It will also show the partitions, and it will more than likely be the /dev/vda1 partition.
            4. Mount that disk. I like to create a directory under /mnt for this: mkdir /mnt/vda1 and then mount it like this: mount /dev/vda1 /mnt/vda1
            5. Now we need to make that environment usable. We need to bind /proc, /sys, and /dev to that environment. Like this:

            mount --bind /proc /mnt/vda1/proc

            mount --bind /sys /mnt/vda1/sys

            mount --bind /dev /mnt/vda1/dev

            1. Now we can 'change root' to that environment: chroot /mnt/vda1
            2. If we check our pwd, we'll have / because we're in the root of this environment now. Double check you're still root with whoami and then you can run passwd and update the password for the root user.
            3. Use exit to leave the environment and go back to the recovery image. Unmount binds and disk cd / ; umount /mnt/vda1/proc ; umount /mnt/vda1/dev ; umount /mnt/vda1/sys ; umount /mnt/vda1

            I put the cd in there to remind you to make sure you're not in the directory you're unmounting or it won't unmount.

            Restart the machine and it should allow you in with the password you've set it to.

            Updated: 17 Sep 2018 12:15 PM
            Helpful?  
            Help us to make this article better
            0 0